summaryrefslogtreecommitdiff
path: root/dhall/build.rs
diff options
context:
space:
mode:
authorNadrieril2020-03-17 23:01:35 +0000
committerNadrieril2020-03-17 23:14:32 +0000
commitc22e161f7bd97d4f6c063513cc051f6af2683d84 (patch)
tree7ebb20c3e9db1657a731c5871716e82685dcab6d /dhall/build.rs
parent681dad33cf27b2be4f4b3cefd83998af1d7eefb2 (diff)
Run clippy
Diffstat (limited to '')
-rw-r--r--dhall/build.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/dhall/build.rs b/dhall/build.rs
index 366f8a4..e6ed0da 100644
--- a/dhall/build.rs
+++ b/dhall/build.rs
@@ -52,7 +52,7 @@ fn dhall_files_in_dir<'a>(
.filter_map(move |path| {
let path = path.path().strip_prefix(dir).unwrap();
let ext = path.extension()?;
- if ext != &OsString::from(filetype.to_ext()) {
+ if *ext != OsString::from(filetype.to_ext()) {
return None;
}
let path = path.to_string_lossy();
@@ -152,6 +152,7 @@ fn generate_tests() -> std::io::Result<()> {
let spec_tests_dirs =
vec![Path::new("../dhall-lang/tests/"), Path::new("tests/")];
+ #[allow(clippy::nonminimal_bool)]
let tests = vec![
TestFeature {
module_name: "parser_success",
@@ -363,7 +364,9 @@ fn convert_abnf_to_pest() -> std::io::Result<()> {
for line in BufReader::new(File::open(visibility_path)?).lines() {
let line = line?;
if line.len() >= 2 && &line[0..2] == "# " {
- rules.get_mut(&line[2..]).map(|x| x.silent = true);
+ if let Some(x) = rules.get_mut(&line[2..]) {
+ x.silent = true;
+ }
}
}