diff options
author | Nadrieril Feneanar | 2020-03-17 23:36:12 +0000 |
---|---|---|
committer | GitHub | 2020-03-17 23:36:12 +0000 |
commit | 6c18f2b698874d125532625e2bedaa6621962074 (patch) | |
tree | dc8eec542bdbbb39bc24b8b43e1abf20490e6702 /dhall/build.rs | |
parent | 681dad33cf27b2be4f4b3cefd83998af1d7eefb2 (diff) | |
parent | 715a941333887c4a29c2c49102bf1455d88a5417 (diff) |
Merge pull request #144 from Nadrieril/clippy
Clippy
Diffstat (limited to '')
-rw-r--r-- | dhall/build.rs | 7 |
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; + } } } |