[INFO] updating cached repository cundd/hackscanner [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/cundd/hackscanner [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/cundd/hackscanner" "work/ex/clippy-test-run/sources/stable/gh/cundd/hackscanner"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/cundd/hackscanner'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/cundd/hackscanner" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/cundd/hackscanner"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/cundd/hackscanner'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 9bb732c6c500c9012dc1a101598b5fd3476fab9f [INFO] sha for GitHub repo cundd/hackscanner: 9bb732c6c500c9012dc1a101598b5fd3476fab9f [INFO] validating manifest of cundd/hackscanner on toolchain stable [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] validating manifest of cundd/hackscanner on toolchain stable+rustflags=-Dclippy::into_iter_on_array [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] started frobbing cundd/hackscanner [INFO] finished frobbing cundd/hackscanner [INFO] frobbed toml for cundd/hackscanner written to work/ex/clippy-test-run/sources/stable/gh/cundd/hackscanner/Cargo.toml [INFO] started frobbing cundd/hackscanner [INFO] finished frobbing cundd/hackscanner [INFO] frobbed toml for cundd/hackscanner written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/cundd/hackscanner/Cargo.toml [INFO] crate cundd/hackscanner has a lockfile. skipping [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] linting cundd/hackscanner against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-7/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/cundd/hackscanner:/opt/crater/workdir:ro,Z" "-v" "/mnt/big/crater/work/local/cargo-home:/opt/crater/cargo-home:ro,Z" "-v" "/mnt/big/crater/work/local/rustup-home:/opt/crater/rustup-home:ro,Z" "-e" "USER_ID=1000" "-e" "SOURCE_DIR=/opt/crater/workdir" "-e" "MAP_USER_ID=1000" "-e" "CARGO_TARGET_DIR=/opt/crater/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/crater/cargo-home" "-e" "RUSTUP_HOME=/opt/crater/rustup-home" "-w" "/opt/crater/workdir" "-m" "1536M" "--network" "none" "rustops/crates-build-env" "/opt/crater/cargo-home/bin/cargo" "+stable" "clippy" "--frozen" "--all" "--all-targets"` [INFO] [stdout] 8e4146ec09a0cac218aff1f986140e80fc72d00555ece6b119aefad59ced07bc [INFO] running `"docker" "start" "-a" "8e4146ec09a0cac218aff1f986140e80fc72d00555ece6b119aefad59ced07bc"` [INFO] [stderr] Checking serde_json v1.0.13 [INFO] [stderr] Checking serde_yaml v0.7.3 [INFO] [stderr] Checking simplelog v0.5.0 [INFO] [stderr] Checking error-chain v0.11.0 [INFO] [stderr] Checking hackscanner v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: module has the same name as its containing module [INFO] [stderr] --> src/rule/mod.rs:1:1 [INFO] [stderr] | [INFO] [stderr] 1 | mod rule; [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::module_inception)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/classifier.rs:55:9 [INFO] [stderr] | [INFO] [stderr] 55 | return true; [INFO] [stderr] | ^^^^^^^^^^^^ help: remove `return` as shown: `true` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_return)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: module has the same name as its containing module [INFO] [stderr] --> src/rule/mod.rs:1:1 [INFO] [stderr] | [INFO] [stderr] 1 | mod rule; [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::module_inception)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/classifier.rs:55:9 [INFO] [stderr] | [INFO] [stderr] 55 | return true; [INFO] [stderr] | ^^^^^^^^^^^^ help: remove `return` as shown: `true` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_return)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/fs/file_type/standalone_file_type.rs:28:38 [INFO] [stderr] | [INFO] [stderr] 28 | pub fn from_file_type(file_type: &fs::FileType) -> Self { [INFO] [stderr] | ^^^^^^^^^^^^^ help: consider passing by value instead: `fs::FileType` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/fs/file_type/standalone_file_type.rs:43:9 [INFO] [stderr] | [INFO] [stderr] 43 | / match self { [INFO] [stderr] 44 | | &FileType::File => false, [INFO] [stderr] 45 | | &FileType::Directory => true, [INFO] [stderr] 46 | | &FileType::Symlink => false, [INFO] [stderr] 47 | | &FileType::Unknown => false, [INFO] [stderr] 48 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_ref_pats)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 43 | match *self { [INFO] [stderr] 44 | FileType::File => false, [INFO] [stderr] 45 | FileType::Directory => true, [INFO] [stderr] 46 | FileType::Symlink => false, [INFO] [stderr] 47 | FileType::Unknown => false, [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/fs/file_type/standalone_file_type.rs:52:9 [INFO] [stderr] | [INFO] [stderr] 52 | / match self { [INFO] [stderr] 53 | | &FileType::File => true, [INFO] [stderr] 54 | | &FileType::Directory => false, [INFO] [stderr] 55 | | &FileType::Symlink => false, [INFO] [stderr] 56 | | &FileType::Unknown => false, [INFO] [stderr] 57 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 52 | match *self { [INFO] [stderr] 53 | FileType::File => true, [INFO] [stderr] 54 | FileType::Directory => false, [INFO] [stderr] 55 | FileType::Symlink => false, [INFO] [stderr] 56 | FileType::Unknown => false, [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/fs/file_type/standalone_file_type.rs:61:9 [INFO] [stderr] | [INFO] [stderr] 61 | / match self { [INFO] [stderr] 62 | | &FileType::File => false, [INFO] [stderr] 63 | | &FileType::Directory => false, [INFO] [stderr] 64 | | &FileType::Symlink => true, [INFO] [stderr] 65 | | &FileType::Unknown => false, [INFO] [stderr] 66 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 61 | match *self { [INFO] [stderr] 62 | FileType::File => false, [INFO] [stderr] 63 | FileType::Directory => false, [INFO] [stderr] 64 | FileType::Symlink => true, [INFO] [stderr] 65 | FileType::Unknown => false, [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/rule/pattern_rule.rs:33:30 [INFO] [stderr] | [INFO] [stderr] 33 | pub fn from_rules(rules: &Vec) -> Vec> { [INFO] [stderr] | ^^^^^^^^^^ help: change this to: `&[Rule]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the Vec [INFO] [stderr] --> src/rule/pattern_rule.rs:34:15 [INFO] [stderr] | [INFO] [stderr] 34 | rules.into_iter().map(|rule| PatternRule::from_rule(rule)).collect() [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::into_iter_on_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/rule/pattern_rule.rs:37:39 [INFO] [stderr] | [INFO] [stderr] 37 | pub fn from_rules_filtered(rules: &Vec) -> Vec { [INFO] [stderr] | ^^^^^^^^^^ help: change this to: `&[Rule]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/rating.rs:61:36 [INFO] [stderr] | [INFO] [stderr] 61 | fn join, T>(rules: &Vec<&D>) -> String { [INFO] [stderr] | ^^^^^^^^ help: change this to: `&[&D]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/rating.rs:71:32 [INFO] [stderr] | [INFO] [stderr] 71 | acc + separator + &format!("{}", rule.name()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `rule.name().to_string()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_format)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/severity.rs:16:24 [INFO] [stderr] | [INFO] [stderr] 16 | pub fn description(&self) -> String { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/severity.rs:17:9 [INFO] [stderr] | [INFO] [stderr] 17 | / match self { [INFO] [stderr] 18 | | &Severity::CRITICAL => "CRITICAL".to_owned(), [INFO] [stderr] 19 | | &Severity::MAJOR => "MAJOR".to_owned(), [INFO] [stderr] 20 | | &Severity::MINOR => "MINOR".to_owned(), [INFO] [stderr] ... | [INFO] [stderr] 24 | | &Severity::WHITELIST => "WHITELIST".to_owned(), [INFO] [stderr] 25 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 17 | match *self { [INFO] [stderr] 18 | Severity::CRITICAL => "CRITICAL".to_owned(), [INFO] [stderr] 19 | Severity::MAJOR => "MAJOR".to_owned(), [INFO] [stderr] 20 | Severity::MINOR => "MINOR".to_owned(), [INFO] [stderr] 21 | Severity::NOTICE => "NOTICE".to_owned(), [INFO] [stderr] 22 | [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: you should consider deriving a `Default` implementation for `file_finder::ftw::FileFinder` [INFO] [stderr] --> src/file_finder/ftw/mod.rs:113:5 [INFO] [stderr] | [INFO] [stderr] 113 | / pub fn new() -> Self { [INFO] [stderr] 114 | | FileFinder {} [INFO] [stderr] 115 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::new_without_default_derive)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default_derive [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 110 | #[derive(Default)] [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] error: you are getting the inner pointer of a temporary `CString` [INFO] [stderr] --> src/file_finder/ftw/mod.rs:139:13 [INFO] [stderr] | [INFO] [stderr] 139 | ftw(CString::new(root).unwrap().as_ptr(), ftw_collector, 20); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::temporary_cstring_as_ptr)] on by default [INFO] [stderr] = note: that pointer will be invalid outside this expression [INFO] [stderr] help: assign the `CString` to a variable to extend its lifetime [INFO] [stderr] --> src/file_finder/ftw/mod.rs:139:13 [INFO] [stderr] | [INFO] [stderr] 139 | ftw(CString::new(root).unwrap().as_ptr(), ftw_collector, 20); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#temporary_cstring_as_ptr [INFO] [stderr] [INFO] [stderr] error: you are getting the inner pointer of a temporary `CString` [INFO] [stderr] --> src/file_finder/ftw/mod.rs:150:14 [INFO] [stderr] | [INFO] [stderr] 150 | nftw(CString::new(root).unwrap().as_ptr(), nftw_collector, 20, FTW_PHYS); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: that pointer will be invalid outside this expression [INFO] [stderr] help: assign the `CString` to a variable to extend its lifetime [INFO] [stderr] --> src/file_finder/ftw/mod.rs:150:14 [INFO] [stderr] | [INFO] [stderr] 150 | nftw(CString::new(root).unwrap().as_ptr(), nftw_collector, 20, FTW_PHYS); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#temporary_cstring_as_ptr [INFO] [stderr] [INFO] [stderr] warning: casting u16 to u32 may become silently lossy if types change [INFO] [stderr] --> src/file_finder/fts/mod.rs:68:24 [INFO] [stderr] | [INFO] [stderr] 68 | if (*child).fts_info as u32 == FTS_F { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `u32::from((*child).fts_info)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cast_lossless)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: Err(_) will match all errors, maybe not a good idea [INFO] [stderr] --> src/file_finder/fts/mod.rs:97:9 [INFO] [stderr] | [INFO] [stderr] 97 | Err(_) => panic!("from_path_with_file_type() must return Ok"), [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_wild_err_arm)] on by default [INFO] [stderr] = note: to remove this warning, match each error separately or use unreachable macro [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wild_err_arm [INFO] [stderr] [INFO] [stderr] warning: you should consider deriving a `Default` implementation for `file_finder::fts::FileFinder` [INFO] [stderr] --> src/file_finder/fts/mod.rs:105:5 [INFO] [stderr] | [INFO] [stderr] 105 | / pub fn new() -> Self { [INFO] [stderr] 106 | | FileFinder {} [INFO] [stderr] 107 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default_derive [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 102 | #[derive(Default)] [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you should consider deriving a `Default` implementation for `file_finder::walkdir::FileFinder` [INFO] [stderr] --> src/file_finder/walkdir.rs:11:5 [INFO] [stderr] | [INFO] [stderr] 11 | / pub fn new() -> Self { [INFO] [stderr] 12 | | FileFinder {} [INFO] [stderr] 13 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default_derive [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 8 | #[derive(Default)] [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/file_finder/mod.rs:16:68 [INFO] [stderr] | [INFO] [stderr] 16 | fn find + Debug + Clone>(&self, root: P, rules: &Vec) -> Vec { [INFO] [stderr] | ^^^^^^^^^^ help: change this to: `&[Rule]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: called `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`. [INFO] [stderr] --> src/file_finder/mod.rs:24:13 [INFO] [stderr] | [INFO] [stderr] 24 | / pattern_rules.iter() [INFO] [stderr] 25 | | .find(|rule| Matcher::match_entry_path(rule, entry)) [INFO] [stderr] 26 | | .is_some() [INFO] [stderr] | |__________________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::search_is_some)] on by default [INFO] [stderr] = note: replace `find(|rule| Matcher::match_entry_path(rule, entry)).is_some()` with `any(|rule| Matcher::match_entry_path(rule, entry))` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#search_is_some [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/file_finder/mod.rs:35:67 [INFO] [stderr] | [INFO] [stderr] 35 | pub fn find_files + Debug + Clone>(root: P, rules: &Vec) -> Vec { [INFO] [stderr] | ^^^^^^^^^^ help: change this to: `&[Rule]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/classifier.rs:13:60 [INFO] [stderr] | [INFO] [stderr] 13 | pub fn classify_entries<'a, 'b, D: DirEntryTrait>(entries: &'a Vec, rules: &'a Vec) -> Vec> { [INFO] [stderr] | ^^^^^^^^^^ help: change this to: `&[D]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/classifier.rs:13:79 [INFO] [stderr] | [INFO] [stderr] 13 | pub fn classify_entries<'a, 'b, D: DirEntryTrait>(entries: &'a Vec, rules: &'a Vec) -> Vec> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[PatternRule]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: this lifetime isn't used in the function definition [INFO] [stderr] --> src/classifier.rs:13:29 [INFO] [stderr] | [INFO] [stderr] 13 | pub fn classify_entries<'a, 'b, D: DirEntryTrait>(entries: &'a Vec, rules: &'a Vec) -> Vec> { [INFO] [stderr] | ^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::extra_unused_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/classifier.rs:23:66 [INFO] [stderr] | [INFO] [stderr] 23 | fn classify_entry<'a, 'b, D: DirEntryTrait>(entry: &'a D, rules: &'a Vec) -> Rating<'a> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[PatternRule]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: this lifetime isn't used in the function definition [INFO] [stderr] --> src/classifier.rs:23:23 [INFO] [stderr] | [INFO] [stderr] 23 | fn classify_entry<'a, 'b, D: DirEntryTrait>(entry: &'a D, rules: &'a Vec) -> Rating<'a> { [INFO] [stderr] | ^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/classifier.rs:63:1 [INFO] [stderr] | [INFO] [stderr] 63 | / fn read_entry_content<'a, D: DirEntryTrait>(entry: &'a D) -> Result { [INFO] [stderr] 64 | | let path = entry.path(); [INFO] [stderr] 65 | | let mut file = match File::open(path) { [INFO] [stderr] 66 | | Ok(f) => f, [INFO] [stderr] ... | [INFO] [stderr] 88 | | Ok(String::from_utf8_lossy(&buffer).to_string()) [INFO] [stderr] 89 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] error: handle read amount returned or use `Read::read_exact` instead [INFO] [stderr] --> src/classifier.rs:80:5 [INFO] [stderr] | [INFO] [stderr] 80 | / match file.read(&mut buffer[..]) { [INFO] [stderr] 81 | | Ok(bytes_count) => bytes_count, [INFO] [stderr] 82 | | Err(e) => { [INFO] [stderr] 83 | | bail!("Could not read file {:?}: {}", entry.path(), e) [INFO] [stderr] 84 | | } [INFO] [stderr] 85 | | }; [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::unused_io_amount)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_io_amount [INFO] [stderr] [INFO] [stderr] error: aborting due to 3 previous errors [INFO] [stderr] [INFO] [stderr] error: Could not compile `hackscanner`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/fs/file_type/standalone_file_type.rs:28:38 [INFO] [stderr] | [INFO] [stderr] 28 | pub fn from_file_type(file_type: &fs::FileType) -> Self { [INFO] [stderr] | ^^^^^^^^^^^^^ help: consider passing by value instead: `fs::FileType` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/fs/file_type/standalone_file_type.rs:43:9 [INFO] [stderr] | [INFO] [stderr] 43 | / match self { [INFO] [stderr] 44 | | &FileType::File => false, [INFO] [stderr] 45 | | &FileType::Directory => true, [INFO] [stderr] 46 | | &FileType::Symlink => false, [INFO] [stderr] 47 | | &FileType::Unknown => false, [INFO] [stderr] 48 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_ref_pats)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 43 | match *self { [INFO] [stderr] 44 | FileType::File => false, [INFO] [stderr] 45 | FileType::Directory => true, [INFO] [stderr] 46 | FileType::Symlink => false, [INFO] [stderr] 47 | FileType::Unknown => false, [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/fs/file_type/standalone_file_type.rs:52:9 [INFO] [stderr] | [INFO] [stderr] 52 | / match self { [INFO] [stderr] 53 | | &FileType::File => true, [INFO] [stderr] 54 | | &FileType::Directory => false, [INFO] [stderr] 55 | | &FileType::Symlink => false, [INFO] [stderr] 56 | | &FileType::Unknown => false, [INFO] [stderr] 57 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 52 | match *self { [INFO] [stderr] 53 | FileType::File => true, [INFO] [stderr] 54 | FileType::Directory => false, [INFO] [stderr] 55 | FileType::Symlink => false, [INFO] [stderr] 56 | FileType::Unknown => false, [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/fs/file_type/standalone_file_type.rs:61:9 [INFO] [stderr] | [INFO] [stderr] 61 | / match self { [INFO] [stderr] 62 | | &FileType::File => false, [INFO] [stderr] 63 | | &FileType::Directory => false, [INFO] [stderr] 64 | | &FileType::Symlink => true, [INFO] [stderr] 65 | | &FileType::Unknown => false, [INFO] [stderr] 66 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 61 | match *self { [INFO] [stderr] 62 | FileType::File => false, [INFO] [stderr] 63 | FileType::Directory => false, [INFO] [stderr] 64 | FileType::Symlink => true, [INFO] [stderr] 65 | FileType::Unknown => false, [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/rule/pattern_rule.rs:33:30 [INFO] [stderr] | [INFO] [stderr] 33 | pub fn from_rules(rules: &Vec) -> Vec> { [INFO] [stderr] | ^^^^^^^^^^ help: change this to: `&[Rule]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the Vec [INFO] [stderr] --> src/rule/pattern_rule.rs:34:15 [INFO] [stderr] | [INFO] [stderr] 34 | rules.into_iter().map(|rule| PatternRule::from_rule(rule)).collect() [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::into_iter_on_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/rule/pattern_rule.rs:37:39 [INFO] [stderr] | [INFO] [stderr] 37 | pub fn from_rules_filtered(rules: &Vec) -> Vec { [INFO] [stderr] | ^^^^^^^^^^ help: change this to: `&[Rule]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/rating.rs:61:36 [INFO] [stderr] | [INFO] [stderr] 61 | fn join, T>(rules: &Vec<&D>) -> String { [INFO] [stderr] | ^^^^^^^^ help: change this to: `&[&D]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/rating.rs:71:32 [INFO] [stderr] | [INFO] [stderr] 71 | acc + separator + &format!("{}", rule.name()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `rule.name().to_string()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_format)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/severity.rs:16:24 [INFO] [stderr] | [INFO] [stderr] 16 | pub fn description(&self) -> String { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/severity.rs:17:9 [INFO] [stderr] | [INFO] [stderr] 17 | / match self { [INFO] [stderr] 18 | | &Severity::CRITICAL => "CRITICAL".to_owned(), [INFO] [stderr] 19 | | &Severity::MAJOR => "MAJOR".to_owned(), [INFO] [stderr] 20 | | &Severity::MINOR => "MINOR".to_owned(), [INFO] [stderr] ... | [INFO] [stderr] 24 | | &Severity::WHITELIST => "WHITELIST".to_owned(), [INFO] [stderr] 25 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 17 | match *self { [INFO] [stderr] 18 | Severity::CRITICAL => "CRITICAL".to_owned(), [INFO] [stderr] 19 | Severity::MAJOR => "MAJOR".to_owned(), [INFO] [stderr] 20 | Severity::MINOR => "MINOR".to_owned(), [INFO] [stderr] 21 | Severity::NOTICE => "NOTICE".to_owned(), [INFO] [stderr] 22 | [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: you should consider deriving a `Default` implementation for `file_finder::ftw::FileFinder` [INFO] [stderr] --> src/file_finder/ftw/mod.rs:113:5 [INFO] [stderr] | [INFO] [stderr] 113 | / pub fn new() -> Self { [INFO] [stderr] 114 | | FileFinder {} [INFO] [stderr] 115 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::new_without_default_derive)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default_derive [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 110 | #[derive(Default)] [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] error: you are getting the inner pointer of a temporary `CString` [INFO] [stderr] --> src/file_finder/ftw/mod.rs:139:13 [INFO] [stderr] | [INFO] [stderr] 139 | ftw(CString::new(root).unwrap().as_ptr(), ftw_collector, 20); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::temporary_cstring_as_ptr)] on by default [INFO] [stderr] = note: that pointer will be invalid outside this expression [INFO] [stderr] help: assign the `CString` to a variable to extend its lifetime [INFO] [stderr] --> src/file_finder/ftw/mod.rs:139:13 [INFO] [stderr] | [INFO] [stderr] 139 | ftw(CString::new(root).unwrap().as_ptr(), ftw_collector, 20); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#temporary_cstring_as_ptr [INFO] [stderr] [INFO] [stderr] error: you are getting the inner pointer of a temporary `CString` [INFO] [stderr] --> src/file_finder/ftw/mod.rs:150:14 [INFO] [stderr] | [INFO] [stderr] 150 | nftw(CString::new(root).unwrap().as_ptr(), nftw_collector, 20, FTW_PHYS); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: that pointer will be invalid outside this expression [INFO] [stderr] help: assign the `CString` to a variable to extend its lifetime [INFO] [stderr] --> src/file_finder/ftw/mod.rs:150:14 [INFO] [stderr] | [INFO] [stderr] 150 | nftw(CString::new(root).unwrap().as_ptr(), nftw_collector, 20, FTW_PHYS); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#temporary_cstring_as_ptr [INFO] [stderr] [INFO] [stderr] warning: casting u16 to u32 may become silently lossy if types change [INFO] [stderr] --> src/file_finder/fts/mod.rs:68:24 [INFO] [stderr] | [INFO] [stderr] 68 | if (*child).fts_info as u32 == FTS_F { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `u32::from((*child).fts_info)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cast_lossless)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: Err(_) will match all errors, maybe not a good idea [INFO] [stderr] --> src/file_finder/fts/mod.rs:97:9 [INFO] [stderr] | [INFO] [stderr] 97 | Err(_) => panic!("from_path_with_file_type() must return Ok"), [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_wild_err_arm)] on by default [INFO] [stderr] = note: to remove this warning, match each error separately or use unreachable macro [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wild_err_arm [INFO] [stderr] [INFO] [stderr] warning: you should consider deriving a `Default` implementation for `file_finder::fts::FileFinder` [INFO] [stderr] --> src/file_finder/fts/mod.rs:105:5 [INFO] [stderr] | [INFO] [stderr] 105 | / pub fn new() -> Self { [INFO] [stderr] 106 | | FileFinder {} [INFO] [stderr] 107 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default_derive [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 102 | #[derive(Default)] [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you should consider deriving a `Default` implementation for `file_finder::walkdir::FileFinder` [INFO] [stderr] --> src/file_finder/walkdir.rs:11:5 [INFO] [stderr] | [INFO] [stderr] 11 | / pub fn new() -> Self { [INFO] [stderr] 12 | | FileFinder {} [INFO] [stderr] 13 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default_derive [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 8 | #[derive(Default)] [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/file_finder/mod.rs:16:68 [INFO] [stderr] | [INFO] [stderr] 16 | fn find + Debug + Clone>(&self, root: P, rules: &Vec) -> Vec { [INFO] [stderr] | ^^^^^^^^^^ help: change this to: `&[Rule]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: called `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`. [INFO] [stderr] --> src/file_finder/mod.rs:24:13 [INFO] [stderr] | [INFO] [stderr] 24 | / pattern_rules.iter() [INFO] [stderr] 25 | | .find(|rule| Matcher::match_entry_path(rule, entry)) [INFO] [stderr] 26 | | .is_some() [INFO] [stderr] | |__________________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::search_is_some)] on by default [INFO] [stderr] = note: replace `find(|rule| Matcher::match_entry_path(rule, entry)).is_some()` with `any(|rule| Matcher::match_entry_path(rule, entry))` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#search_is_some [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/file_finder/mod.rs:35:67 [INFO] [stderr] | [INFO] [stderr] 35 | pub fn find_files + Debug + Clone>(root: P, rules: &Vec) -> Vec { [INFO] [stderr] | ^^^^^^^^^^ help: change this to: `&[Rule]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/classifier.rs:13:60 [INFO] [stderr] | [INFO] [stderr] 13 | pub fn classify_entries<'a, 'b, D: DirEntryTrait>(entries: &'a Vec, rules: &'a Vec) -> Vec> { [INFO] [stderr] | ^^^^^^^^^^ help: change this to: `&[D]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/classifier.rs:13:79 [INFO] [stderr] | [INFO] [stderr] 13 | pub fn classify_entries<'a, 'b, D: DirEntryTrait>(entries: &'a Vec, rules: &'a Vec) -> Vec> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[PatternRule]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: this lifetime isn't used in the function definition [INFO] [stderr] --> src/classifier.rs:13:29 [INFO] [stderr] | [INFO] [stderr] 13 | pub fn classify_entries<'a, 'b, D: DirEntryTrait>(entries: &'a Vec, rules: &'a Vec) -> Vec> { [INFO] [stderr] | ^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::extra_unused_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/classifier.rs:23:66 [INFO] [stderr] | [INFO] [stderr] 23 | fn classify_entry<'a, 'b, D: DirEntryTrait>(entry: &'a D, rules: &'a Vec) -> Rating<'a> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[PatternRule]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: this lifetime isn't used in the function definition [INFO] [stderr] --> src/classifier.rs:23:23 [INFO] [stderr] | [INFO] [stderr] 23 | fn classify_entry<'a, 'b, D: DirEntryTrait>(entry: &'a D, rules: &'a Vec) -> Rating<'a> { [INFO] [stderr] | ^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/classifier.rs:63:1 [INFO] [stderr] | [INFO] [stderr] 63 | / fn read_entry_content<'a, D: DirEntryTrait>(entry: &'a D) -> Result { [INFO] [stderr] 64 | | let path = entry.path(); [INFO] [stderr] 65 | | let mut file = match File::open(path) { [INFO] [stderr] 66 | | Ok(f) => f, [INFO] [stderr] ... | [INFO] [stderr] 88 | | Ok(String::from_utf8_lossy(&buffer).to_string()) [INFO] [stderr] 89 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] error: handle read amount returned or use `Read::read_exact` instead [INFO] [stderr] --> src/classifier.rs:80:5 [INFO] [stderr] | [INFO] [stderr] 80 | / match file.read(&mut buffer[..]) { [INFO] [stderr] 81 | | Ok(bytes_count) => bytes_count, [INFO] [stderr] 82 | | Err(e) => { [INFO] [stderr] 83 | | bail!("Could not read file {:?}: {}", entry.path(), e) [INFO] [stderr] 84 | | } [INFO] [stderr] 85 | | }; [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::unused_io_amount)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_io_amount [INFO] [stderr] [INFO] [stderr] error: aborting due to 3 previous errors [INFO] [stderr] [INFO] [stderr] error: Could not compile `hackscanner`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "8e4146ec09a0cac218aff1f986140e80fc72d00555ece6b119aefad59ced07bc"` [INFO] running `"docker" "rm" "-f" "8e4146ec09a0cac218aff1f986140e80fc72d00555ece6b119aefad59ced07bc"` [INFO] [stdout] 8e4146ec09a0cac218aff1f986140e80fc72d00555ece6b119aefad59ced07bc