From c22e161f7bd97d4f6c063513cc051f6af2683d84 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Tue, 17 Mar 2020 23:01:35 +0000 Subject: Run clippy --- dhall/build.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'dhall/build.rs') 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; + } } } -- cgit v1.2.3