summaryrefslogtreecommitdiff
path: root/dhall/src/normalize.rs
diff options
context:
space:
mode:
authorNadrieril2019-04-18 14:39:56 +0200
committerNadrieril2019-04-18 14:39:56 +0200
commit9474d4939db6f844285182fc15aad74f6aa18e21 (patch)
tree7f14c06afccd10e32c3003555bce809e713d2bfe /dhall/src/normalize.rs
parent69267c7cc108a2f5db35c52a71afaa5be7be7355 (diff)
Remove more duplication
Diffstat (limited to 'dhall/src/normalize.rs')
-rw-r--r--dhall/src/normalize.rs18
1 files changed, 8 insertions, 10 deletions
diff --git a/dhall/src/normalize.rs b/dhall/src/normalize.rs
index 9110624..a54e48e 100644
--- a/dhall/src/normalize.rs
+++ b/dhall/src/normalize.rs
@@ -325,19 +325,17 @@ fn normalize_ref(expr: &Expr<X, Normalized<'static>>) -> Expr<X, X> {
};
match what_next {
- Continue(e) => normalize_ref(&e.absurd_rec()),
- ContinueSub(e) => normalize_ref(e.absurd().as_ref()),
+ Continue(e) => normalize_ref(&e.embed_absurd()),
+ ContinueSub(e) => normalize_ref(e.embed_absurd().as_ref()),
Done(e) => e,
DoneRef(e) => e.clone(),
DoneRefSub(e) => e.unroll(),
- DoneAsIs => match expr.map_ref_simple(ExprF::roll) {
- e => e.map_ref(
- SubExpr::clone,
- X::clone,
- |_| unreachable!(),
- Label::clone,
- ),
- },
+ DoneAsIs => expr.map_ref_simple(ExprF::roll).map_ref(
+ SubExpr::clone,
+ X::clone,
+ |_| unreachable!(),
+ Label::clone,
+ ),
}
}