From 41925f9c168785043d6dafa4a6049b491c384689 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Wed, 6 Mar 2019 20:50:11 +0100 Subject: Remove more clutter in normalize --- dhall_normalize/src/normalize.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'dhall_normalize/src') diff --git a/dhall_normalize/src/normalize.rs b/dhall_normalize/src/normalize.rs index fb8079a..2530d1c 100644 --- a/dhall_normalize/src/normalize.rs +++ b/dhall_normalize/src/normalize.rs @@ -21,22 +21,22 @@ where use dhall_core::BinOp::*; use dhall_core::Builtin::*; use dhall_core::Expr::*; - match *e { + match e { // Matches that don't normalize everything right away - Let(f, _, ref r, ref b) => { + Let(f, _, r, b) => { let r2 = shift::<_, S, _>(1, V(f, 0), r); let b2 = subst(V(f, 0), &r2, b); let b3 = shift::<_, T, _>(-1, V(f, 0), &b2); normalize(&b3) } - BoolIf(ref b, ref t, ref f) => match normalize(b) { + BoolIf(b, t, f) => match normalize(b) { BoolLit(true) => normalize(t), BoolLit(false) => normalize(f), b2 => BoolIf(bx(b2), bx(normalize(t)), bx(normalize(f))), }, - Annot(ref x, _) => normalize(x), - Note(_, ref e) => normalize(e), - App(ref f, ref a) => match normalize::(f) { + Annot(x, _) => normalize(x), + Note(_, e) => normalize(e), + App(f, a) => match normalize::(f) { Lam(x, _A, b) => { // Beta reduce let vx0 = V(x, 0); @@ -148,7 +148,7 @@ where }, // Normalize everything else before matching - ref e => match e.map_shallow(normalize, |_| unreachable!()) { + e => match e.map_shallow(normalize, |_| unreachable!()) { BinOp(BoolAnd, box BoolLit(x), box BoolLit(y)) => BoolLit(x && y), BinOp(BoolOr, box BoolLit(x), box BoolLit(y)) => BoolLit(x || y), BinOp(BoolEQ, box BoolLit(x), box BoolLit(y)) => BoolLit(x == y), -- cgit v1.2.3