summaryrefslogtreecommitdiff
path: root/dhall/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--dhall/src/phase/mod.rs5
-rw-r--r--dhall/src/phase/typecheck.rs2
-rw-r--r--dhall/src/tests.rs3
3 files changed, 5 insertions, 5 deletions
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()));
}
diff --git a/dhall/src/tests.rs b/dhall/src/tests.rs
index 074818a..3055717 100644
--- a/dhall/src/tests.rs
+++ b/dhall/src/tests.rs
@@ -64,7 +64,7 @@ pub enum Status {
Failure,
}
-fn parse_file_str<'i>(file_path: &str) -> Result<Parsed> {
+fn parse_file_str(file_path: &str) -> Result<Parsed> {
Parsed::parse_file(&PathBuf::from(file_path))
}
@@ -80,6 +80,7 @@ pub fn run_test_stringy_error(
.map(|_| ())
}
+#[allow(clippy::single_match)]
pub fn run_test(
base_path: &str,
feature: Feature,