From a981afc465f4279a7a4d6ce3ac5844e04846613b Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Tue, 27 Aug 2019 22:58:20 +0200 Subject: clippy --- dhall/src/phase/mod.rs | 5 ++--- dhall/src/phase/typecheck.rs | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'dhall/src/phase') diff --git a/dhall/src/phase/mod.rs b/dhall/src/phase/mod.rs index ed608df..bd8853a 100644 --- a/dhall/src/phase/mod.rs +++ b/dhall/src/phase/mod.rs @@ -221,9 +221,8 @@ impl std::hash::Hash for Normalized { where H: std::hash::Hasher, { - match self.encode() { - Ok(vec) => vec.hash(state), - Err(_) => {} + if let Ok(vec) = self.encode() { + vec.hash(state) } } } diff --git a/dhall/src/phase/typecheck.rs b/dhall/src/phase/typecheck.rs index ef2018a..ab6d882 100644 --- a/dhall/src/phase/typecheck.rs +++ b/dhall/src/phase/typecheck.rs @@ -408,7 +408,7 @@ fn type_last_layer( RetTypeOnly(t.clone()) } BoolIf(x, y, z) => { - if &*x.get_type()?.as_whnf() != &ValueF::from_builtin(Bool) { + if *x.get_type()?.as_whnf() != ValueF::from_builtin(Bool) { return mkerr(InvalidPredicate(x.clone())); } -- cgit v1.2.3