[INFO] updating cached repository Srynetix/pssh-rs [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/Srynetix/pssh-rs [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/Srynetix/pssh-rs" "work/ex/clippy-test-run/sources/stable/gh/Srynetix/pssh-rs"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/Srynetix/pssh-rs'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/Srynetix/pssh-rs" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/Srynetix/pssh-rs"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/Srynetix/pssh-rs'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 31b69302a963abe242560eefe892bce04aae8cf0 [INFO] sha for GitHub repo Srynetix/pssh-rs: 31b69302a963abe242560eefe892bce04aae8cf0 [INFO] validating manifest of Srynetix/pssh-rs 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 Srynetix/pssh-rs 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 Srynetix/pssh-rs [INFO] finished frobbing Srynetix/pssh-rs [INFO] frobbed toml for Srynetix/pssh-rs written to work/ex/clippy-test-run/sources/stable/gh/Srynetix/pssh-rs/Cargo.toml [INFO] started frobbing Srynetix/pssh-rs [INFO] finished frobbing Srynetix/pssh-rs [INFO] frobbed toml for Srynetix/pssh-rs written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/Srynetix/pssh-rs/Cargo.toml [INFO] crate Srynetix/pssh-rs 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 Srynetix/pssh-rs against stable+rustflags=-Dclippy::into_iter_on_array for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-7/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/Srynetix/pssh-rs:/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 -Dclippy::into_iter_on_array" "-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] 5c29f8938b1722893b116b9035156023706b955dc98e61e8c9d6b5275e7b2611 [INFO] running `"docker" "start" "-a" "5c29f8938b1722893b116b9035156023706b955dc98e61e8c9d6b5275e7b2611"` [INFO] [stderr] Checking maplit v1.0.0 [INFO] [stderr] Checking pssh-rs v1.0.0 (/opt/crater/workdir) [INFO] [stderr] warning: use of deprecated item 'std::env::home_dir': This function's behavior is unexpected and probably not what you want. Consider using the home_dir function from https://crates.io/crates/dirs instead. [INFO] [stderr] --> src/config.rs:137:27 [INFO] [stderr] | [INFO] [stderr] 137 | let home_path = match env::home_dir() { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(deprecated)] on by default [INFO] [stderr] [INFO] [stderr] warning: use of deprecated item 'std::env::home_dir': This function's behavior is unexpected and probably not what you want. Consider using the home_dir function from https://crates.io/crates/dirs instead. [INFO] [stderr] --> src/config.rs:137:27 [INFO] [stderr] | [INFO] [stderr] 137 | let home_path = match env::home_dir() { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(deprecated)] on by default [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/config.rs:82:9 [INFO] [stderr] | [INFO] [stderr] 82 | self.ip.as_ref().map(|x| println!(" IP: {}", x)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- [INFO] [stderr] | | [INFO] [stderr] | help: try this: `if let Some(x) = self.ip.as_ref() { $ crate :: io :: _print ( format_args_nl ! ( $ ( $ arg ) * ) ) ; }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::option_map_unit_fn)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/config.rs:83:9 [INFO] [stderr] | [INFO] [stderr] 83 | self.port.as_ref().map(|x| println!(" Port: {}", x)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- [INFO] [stderr] | | [INFO] [stderr] | help: try this: `if let Some(x) = self.port.as_ref() { $ crate :: io :: _print ( format_args_nl ! ( $ ( $ arg ) * ) ) ; }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/config.rs:84:9 [INFO] [stderr] | [INFO] [stderr] 84 | self.user.as_ref().map(|x| println!(" User: {}", x)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- [INFO] [stderr] | | [INFO] [stderr] | help: try this: `if let Some(x) = self.user.as_ref() { $ crate :: io :: _print ( format_args_nl ! ( $ ( $ arg ) * ) ) ; }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/config.rs:85:9 [INFO] [stderr] | [INFO] [stderr] 85 | self.pass.as_ref().map(|_| println!(" Pass: *******")); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- [INFO] [stderr] | | [INFO] [stderr] | help: try this: `if let Some(_) = self.pass.as_ref() { $ crate :: io :: _print ( format_args_nl ! ( $ ( $ arg ) * ) ) ; }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/config.rs:86:9 [INFO] [stderr] | [INFO] [stderr] 86 | self.identity.as_ref().map(|x| println!(" Identity: {}", x)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- [INFO] [stderr] | | [INFO] [stderr] | help: try this: `if let Some(x) = self.identity.as_ref() { $ crate :: io :: _print ( format_args_nl ! ( $ ( $ arg ) * ) ) ; }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: use of `expect` followed by a function call [INFO] [stderr] --> src/config.rs:105:43 [INFO] [stderr] | [INFO] [stderr] 105 | let mut f = File::open(&path_to_file).expect(&format!("File {} not found.", path_to_file)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| panic!("File {} not found.", path_to_file))` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::expect_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stderr] [INFO] [stderr] warning: this boolean expression can be simplified [INFO] [stderr] --> src/wrapper.rs:106:12 [INFO] [stderr] | [INFO] [stderr] 106 | if !config.user.is_none() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `config.user.is_some()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::nonminimal_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/wrapper.rs:121:9 [INFO] [stderr] | [INFO] [stderr] 121 | / format!("{}", [INFO] [stderr] 122 | | config.ip.as_ref().unwrap() [INFO] [stderr] 123 | | ) [INFO] [stderr] | |_________^ help: consider using .to_string(): `config.ip.as_ref().unwrap().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: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/config.rs:82:9 [INFO] [stderr] | [INFO] [stderr] 82 | self.ip.as_ref().map(|x| println!(" IP: {}", x)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- [INFO] [stderr] | | [INFO] [stderr] | help: try this: `if let Some(x) = self.ip.as_ref() { $ crate :: io :: _print ( format_args_nl ! ( $ ( $ arg ) * ) ) ; }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::option_map_unit_fn)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/config.rs:83:9 [INFO] [stderr] | [INFO] [stderr] 83 | self.port.as_ref().map(|x| println!(" Port: {}", x)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- [INFO] [stderr] | | [INFO] [stderr] | help: try this: `if let Some(x) = self.port.as_ref() { $ crate :: io :: _print ( format_args_nl ! ( $ ( $ arg ) * ) ) ; }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/config.rs:84:9 [INFO] [stderr] | [INFO] [stderr] 84 | self.user.as_ref().map(|x| println!(" User: {}", x)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- [INFO] [stderr] | | [INFO] [stderr] | help: try this: `if let Some(x) = self.user.as_ref() { $ crate :: io :: _print ( format_args_nl ! ( $ ( $ arg ) * ) ) ; }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/config.rs:85:9 [INFO] [stderr] | [INFO] [stderr] 85 | self.pass.as_ref().map(|_| println!(" Pass: *******")); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- [INFO] [stderr] | | [INFO] [stderr] | help: try this: `if let Some(_) = self.pass.as_ref() { $ crate :: io :: _print ( format_args_nl ! ( $ ( $ arg ) * ) ) ; }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/config.rs:86:9 [INFO] [stderr] | [INFO] [stderr] 86 | self.identity.as_ref().map(|x| println!(" Identity: {}", x)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- [INFO] [stderr] | | [INFO] [stderr] | help: try this: `if let Some(x) = self.identity.as_ref() { $ crate :: io :: _print ( format_args_nl ! ( $ ( $ arg ) * ) ) ; }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: use of `expect` followed by a function call [INFO] [stderr] --> src/config.rs:105:43 [INFO] [stderr] | [INFO] [stderr] 105 | let mut f = File::open(&path_to_file).expect(&format!("File {} not found.", path_to_file)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| panic!("File {} not found.", path_to_file))` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::expect_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stderr] [INFO] [stderr] warning: equality checks against false can be replaced by a negation [INFO] [stderr] --> src/config.rs:328:17 [INFO] [stderr] | [INFO] [stderr] 328 | assert!(config.default_values.contains_key("four") == false); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `!config.default_values.contains_key("four")` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::bool_comparison)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stderr] [INFO] [stderr] warning: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise [INFO] [stderr] --> src/config.rs:413:24 [INFO] [stderr] | [INFO] [stderr] 413 | let m_coucou = configured_machines.get(&"coucou".to_string()).unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&configured_machines[&"coucou".to_string()]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::get_unwrap)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap [INFO] [stderr] [INFO] [stderr] warning: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise [INFO] [stderr] --> src/config.rs:414:30 [INFO] [stderr] | [INFO] [stderr] 414 | let m_coucou_hello = configured_machines.get(&"coucou:hello".to_string()).unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&configured_machines[&"coucou:hello".to_string()]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap [INFO] [stderr] [INFO] [stderr] warning: this boolean expression can be simplified [INFO] [stderr] --> src/wrapper.rs:106:12 [INFO] [stderr] | [INFO] [stderr] 106 | if !config.user.is_none() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `config.user.is_some()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::nonminimal_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/wrapper.rs:121:9 [INFO] [stderr] | [INFO] [stderr] 121 | / format!("{}", [INFO] [stderr] 122 | | config.ip.as_ref().unwrap() [INFO] [stderr] 123 | | ) [INFO] [stderr] | |_________^ help: consider using .to_string(): `config.ip.as_ref().unwrap().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: single-character string constant used as pattern [INFO] [stderr] --> src/wrapper.rs:154:25 [INFO] [stderr] | [INFO] [stderr] 154 | debug_cmd.split(" ").map(|s| { [INFO] [stderr] | ^^^ help: try using a char instead: `' '` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_char_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 2.58s [INFO] running `"docker" "inspect" "5c29f8938b1722893b116b9035156023706b955dc98e61e8c9d6b5275e7b2611"` [INFO] running `"docker" "rm" "-f" "5c29f8938b1722893b116b9035156023706b955dc98e61e8c9d6b5275e7b2611"` [INFO] [stdout] 5c29f8938b1722893b116b9035156023706b955dc98e61e8c9d6b5275e7b2611