diff options
author | Nadrieril | 2019-04-18 14:39:56 +0200 |
---|---|---|
committer | Nadrieril | 2019-04-18 14:39:56 +0200 |
commit | 9474d4939db6f844285182fc15aad74f6aa18e21 (patch) | |
tree | 7f14c06afccd10e32c3003555bce809e713d2bfe /dhall/src/normalize.rs | |
parent | 69267c7cc108a2f5db35c52a71afaa5be7be7355 (diff) |
Remove more duplication
Diffstat (limited to '')
-rw-r--r-- | dhall/src/normalize.rs | 18 |
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, + ), } } |