From ea08d2528d2ee46446ac8981e72af5c610e43ce1 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Thu, 21 Mar 2019 21:29:20 +0100 Subject: rustfmt --- dhall/src/normalize.rs | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/dhall/src/normalize.rs b/dhall/src/normalize.rs index 65a9552..4652b25 100644 --- a/dhall/src/normalize.rs +++ b/dhall/src/normalize.rs @@ -63,15 +63,11 @@ where } (ListLength, Some(EmptyListLit(_)), _) => rc(NaturalLit(0)), (ListLength, Some(NEListLit(ys)), _) => rc(NaturalLit(ys.len())), - (ListHead, Some(EmptyListLit(t)), _) => { - rc(EmptyOptionalLit(t.clone())) - } + (ListHead, Some(EmptyListLit(t)), _) => rc(EmptyOptionalLit(t.clone())), (ListHead, Some(NEListLit(ys)), _) => { rc(NEOptionalLit(ys.first().unwrap().clone())) } - (ListLast, Some(EmptyListLit(t)), _) => { - rc(EmptyOptionalLit(t.clone())) - } + (ListLast, Some(EmptyListLit(t)), _) => rc(EmptyOptionalLit(t.clone())), (ListLast, Some(NEListLit(ys)), _) => { rc(NEOptionalLit(ys.last().unwrap().clone())) } @@ -142,11 +138,7 @@ where // (ListFold, [_, App(box Builtin(ListBuild), [_, x, rest..]), rest..]) => { // normalize_whnf(&App(bx(x.clone()), rest.to_vec())) // } - ( - OptionalFold, - Some(NEOptionalLit(x)), - [_, _, _, just, _, ..], - ) => { + (OptionalFold, Some(NEOptionalLit(x)), [_, _, _, just, _, ..]) => { let x = x.clone(); let just = Rc::clone(just); dhall_expr!(just x) -- cgit v1.2.3