summaryrefslogtreecommitdiff
path: root/dhall
diff options
context:
space:
mode:
Diffstat (limited to 'dhall')
-rw-r--r--dhall/src/imports.rs3
-rw-r--r--dhall/src/lib.rs5
-rw-r--r--dhall/src/main.rs4
-rw-r--r--dhall/src/normalize.rs2
-rw-r--r--dhall/src/typecheck.rs2
5 files changed, 10 insertions, 6 deletions
diff --git a/dhall/src/imports.rs b/dhall/src/imports.rs
index 007ed47..22f7863 100644
--- a/dhall/src/imports.rs
+++ b/dhall/src/imports.rs
@@ -78,8 +78,7 @@ pub fn load_dhall_file(
let resolve = |import: &Import| -> Expr<X, X> {
resolve_import(import, &root).unwrap()
};
- let expr = expr.map_embed(&resolve).squash_embed();
- expr
+ expr.map_embed(&resolve).squash_embed()
} else {
panic_imports(&expr)
};
diff --git a/dhall/src/lib.rs b/dhall/src/lib.rs
index 8add5b6..a8643bb 100644
--- a/dhall/src/lib.rs
+++ b/dhall/src/lib.rs
@@ -1,6 +1,11 @@
#![feature(box_patterns)]
#![feature(trace_macros)]
#![feature(proc_macro_hygiene)]
+#![allow(
+ clippy::type_complexity,
+ clippy::infallible_destructuring_match,
+ clippy::many_single_char_names
+)]
mod normalize;
pub use crate::normalize::*;
diff --git a/dhall/src/main.rs b/dhall/src/main.rs
index edc6baf..3328d99 100644
--- a/dhall/src/main.rs
+++ b/dhall/src/main.rs
@@ -28,7 +28,7 @@ fn print_error(message: &str, source: &str, start: usize, end: usize) {
BOLD.with(|| {
print!(" -->");
});
- println!(" {}:{}:0", "(stdin)", line_number);
+ println!(" (stdin):{}:0", line_number);
BOLD.with(|| {
println!("{:w$} |", "", w = line_number_width);
print!("{} |", line_number_str);
@@ -88,6 +88,6 @@ fn main() {
};
println!("{}", type_expr);
- println!("");
+ println!();
println!("{}", normalize::<_, X, _>(&expr));
}
diff --git a/dhall/src/normalize.rs b/dhall/src/normalize.rs
index b2ee0f6..c23f887 100644
--- a/dhall/src/normalize.rs
+++ b/dhall/src/normalize.rs
@@ -175,7 +175,7 @@ where
}
BinOp(ListAppend, box ListLit(t1, xs), box ListLit(t2, ys)) => {
// Drop type annotation if the result is nonempty
- let t = if xs.len() == 0 && ys.len() == 0 {
+ let t = if xs.is_empty() && ys.is_empty() {
t1.or(t2)
} else {
None
diff --git a/dhall/src/typecheck.rs b/dhall/src/typecheck.rs
index 28982fc..2916526 100644
--- a/dhall/src/typecheck.rs
+++ b/dhall/src/typecheck.rs
@@ -775,7 +775,7 @@ impl<S: Clone> TypeError<S> {
TypeError {
context: context.clone(),
current: current.clone(),
- type_message: type_message,
+ type_message,
}
}
}