[INFO] updating cached repository tumbl3w33d/interface_scraper [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/tumbl3w33d/interface_scraper [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/tumbl3w33d/interface_scraper" "work/ex/clippy-test-run/sources/stable/gh/tumbl3w33d/interface_scraper"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/tumbl3w33d/interface_scraper'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/tumbl3w33d/interface_scraper" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/tumbl3w33d/interface_scraper"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/tumbl3w33d/interface_scraper'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 144a4a2ede54b6908007107bae78cafe0bccc4ec [INFO] sha for GitHub repo tumbl3w33d/interface_scraper: 144a4a2ede54b6908007107bae78cafe0bccc4ec [INFO] validating manifest of tumbl3w33d/interface_scraper 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 tumbl3w33d/interface_scraper 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 tumbl3w33d/interface_scraper [INFO] finished frobbing tumbl3w33d/interface_scraper [INFO] frobbed toml for tumbl3w33d/interface_scraper written to work/ex/clippy-test-run/sources/stable/gh/tumbl3w33d/interface_scraper/Cargo.toml [INFO] started frobbing tumbl3w33d/interface_scraper [INFO] finished frobbing tumbl3w33d/interface_scraper [INFO] frobbed toml for tumbl3w33d/interface_scraper written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/tumbl3w33d/interface_scraper/Cargo.toml [INFO] crate tumbl3w33d/interface_scraper 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 tumbl3w33d/interface_scraper against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-1/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/tumbl3w33d/interface_scraper:/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] f93d1af068a7a9b3dab9d169e255ca221b01f2c83ba07bc6dc0cb9f8ee5e4a4b [INFO] running `"docker" "start" "-a" "f93d1af068a7a9b3dab9d169e255ca221b01f2c83ba07bc6dc0cb9f8ee5e4a4b"` [INFO] [stderr] Checking libc v0.2.40 [INFO] [stderr] Compiling proc-macro2 v0.3.8 [INFO] [stderr] Compiling quote v0.5.2 [INFO] [stderr] Checking memchr v2.0.1 [INFO] [stderr] Compiling syn v0.13.11 [INFO] [stderr] Checking aho-corasick v0.6.4 [INFO] [stderr] Checking regex v1.0.1 [INFO] [stderr] Compiling getset v0.0.6 [INFO] [stderr] Checking interface_scraper v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: this `else { if .. }` block can be collapsed [INFO] [stderr] --> src/ifconfig.rs:39:12 [INFO] [stderr] | [INFO] [stderr] 39 | } else { [INFO] [stderr] | ____________^ [INFO] [stderr] 40 | | if let Some(code) = output.status.code() { [INFO] [stderr] 41 | | Err(Error::from_raw_os_error(code)) [INFO] [stderr] 42 | | } else { [INFO] [stderr] 43 | | Err(Error::new(ErrorKind::Other, "Cannot get exit code of ip command execution (process must have been killed by signal)")) [INFO] [stderr] 44 | | } [INFO] [stderr] 45 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::collapsible_if)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stderr] help: try [INFO] [stderr] | [INFO] [stderr] 39 | } else if let Some(code) = output.status.code() { [INFO] [stderr] 40 | Err(Error::from_raw_os_error(code)) [INFO] [stderr] 41 | } else { [INFO] [stderr] 42 | Err(Error::new(ErrorKind::Other, "Cannot get exit code of ip command execution (process must have been killed by signal)")) [INFO] [stderr] 43 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: this `else { if .. }` block can be collapsed [INFO] [stderr] --> src/ifconfig.rs:39:12 [INFO] [stderr] | [INFO] [stderr] 39 | } else { [INFO] [stderr] | ____________^ [INFO] [stderr] 40 | | if let Some(code) = output.status.code() { [INFO] [stderr] 41 | | Err(Error::from_raw_os_error(code)) [INFO] [stderr] 42 | | } else { [INFO] [stderr] 43 | | Err(Error::new(ErrorKind::Other, "Cannot get exit code of ip command execution (process must have been killed by signal)")) [INFO] [stderr] 44 | | } [INFO] [stderr] 45 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::collapsible_if)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stderr] help: try [INFO] [stderr] | [INFO] [stderr] 39 | } else if let Some(code) = output.status.code() { [INFO] [stderr] 40 | Err(Error::from_raw_os_error(code)) [INFO] [stderr] 41 | } else { [INFO] [stderr] 42 | Err(Error::new(ErrorKind::Other, "Cannot get exit code of ip command execution (process must have been killed by signal)")) [INFO] [stderr] 43 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/ifconfig.rs:24:45 [INFO] [stderr] | [INFO] [stderr] 24 | let lines = string_to_analyze.split("\n").filter(|l| !l.is_empty()); [INFO] [stderr] | ^^^^ help: try using a char instead: `'\n'` [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] warning: identical conversion [INFO] [stderr] --> src/ifconfig.rs:25:18 [INFO] [stderr] | [INFO] [stderr] 25 | for l in lines.into_iter() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `lines` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::identity_conversion)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/ifconfig.rs:55:60 [INFO] [stderr] | [INFO] [stderr] 55 | let mut octets: Vec<&str> = captures["cidr"].split(r".").collect(); [INFO] [stderr] | ^^^^ help: try using a char instead: `'".'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/ifconfig.rs:56:70 [INFO] [stderr] | [INFO] [stderr] 56 | let last_oct_split: Vec<&str> = octets.last().unwrap().split("/").collect(); [INFO] [stderr] | ^^^ help: try using a char instead: `'/'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/ifconfig.rs:65:52 [INFO] [stderr] | [INFO] [stderr] 65 | let nm_octets: Vec = netmask.split(".").map(|x| x.parse().unwrap()).collect(); [INFO] [stderr] | ^^^ help: try using a char instead: `'.'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/ifconfig.rs:86:61 [INFO] [stderr] | [INFO] [stderr] 86 | let mut octets: Vec = captures["gateway"].split(r".").map(|x| x.parse().unwrap()).collect(); [INFO] [stderr] | ^^^^ help: try using a char instead: `'".'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: methods called `is_*` usually take self by reference or no self; consider choosing a less ambiguous name [INFO] [stderr] --> src/interface.rs:87:29 [INFO] [stderr] | [INFO] [stderr] 87 | pub fn is_wan_interface(&mut self, is_wan_iface: bool) -> &mut Self { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/ifconfig.rs:24:45 [INFO] [stderr] | [INFO] [stderr] 24 | let lines = string_to_analyze.split("\n").filter(|l| !l.is_empty()); [INFO] [stderr] | ^^^^ help: try using a char instead: `'\n'` [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] warning: identical conversion [INFO] [stderr] --> src/ifconfig.rs:25:18 [INFO] [stderr] | [INFO] [stderr] 25 | for l in lines.into_iter() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `lines` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::identity_conversion)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion [INFO] [stderr] [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::wrong_self_convention)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/ifconfig.rs:55:60 [INFO] [stderr] | [INFO] [stderr] 55 | let mut octets: Vec<&str> = captures["cidr"].split(r".").collect(); [INFO] [stderr] | ^^^^ help: try using a char instead: `'".'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/ifconfig.rs:56:70 [INFO] [stderr] | [INFO] [stderr] 56 | let last_oct_split: Vec<&str> = octets.last().unwrap().split("/").collect(); [INFO] [stderr] | ^^^ help: try using a char instead: `'/'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/ifconfig.rs:65:52 [INFO] [stderr] | [INFO] [stderr] 65 | let nm_octets: Vec = netmask.split(".").map(|x| x.parse().unwrap()).collect(); [INFO] [stderr] | ^^^ help: try using a char instead: `'.'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] error: using `clone` on a double-reference; this will copy the reference instead of cloning the inner type [INFO] [stderr] --> src/netmask.rs:23:10 [INFO] [stderr] | [INFO] [stderr] 23 | Some(netmask.clone().to_string()) [INFO] [stderr] | ^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::clone_double_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_double_ref [INFO] [stderr] help: try dereferencing it [INFO] [stderr] | [INFO] [stderr] 23 | Some(&(*netmask).clone().to_string()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] help: or try being explicit about what type to clone [INFO] [stderr] | [INFO] [stderr] 23 | Some(&str::clone(netmask).to_string()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/ifconfig.rs:86:61 [INFO] [stderr] | [INFO] [stderr] 86 | let mut octets: Vec = captures["gateway"].split(r".").map(|x| x.parse().unwrap()).collect(); [INFO] [stderr] | ^^^^ help: try using a char instead: `'".'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] warning: methods called `is_*` usually take self by reference or no self; consider choosing a less ambiguous name [INFO] [stderr] --> src/interface.rs:87:29 [INFO] [stderr] | [INFO] [stderr] 87 | pub fn is_wan_interface(&mut self, is_wan_iface: bool) -> &mut Self { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::wrong_self_convention)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stderr] [INFO] [stderr] error: using `clone` on a double-reference; this will copy the reference instead of cloning the inner type [INFO] [stderr] --> src/netmask.rs:23:10 [INFO] [stderr] | [INFO] [stderr] 23 | Some(netmask.clone().to_string()) [INFO] [stderr] | ^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::clone_double_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_double_ref [INFO] [stderr] help: try dereferencing it [INFO] [stderr] | [INFO] [stderr] 23 | Some(&(*netmask).clone().to_string()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] help: or try being explicit about what type to clone [INFO] [stderr] | [INFO] [stderr] 23 | Some(&str::clone(netmask).to_string()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/lib.rs:19:17 [INFO] [stderr] | [INFO] [stderr] 19 | assert!(ifaces.len() > 0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!ifaces.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] error: Could not compile `interface_scraper`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] error: Could not compile `interface_scraper`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "f93d1af068a7a9b3dab9d169e255ca221b01f2c83ba07bc6dc0cb9f8ee5e4a4b"` [INFO] running `"docker" "rm" "-f" "f93d1af068a7a9b3dab9d169e255ca221b01f2c83ba07bc6dc0cb9f8ee5e4a4b"` [INFO] [stdout] f93d1af068a7a9b3dab9d169e255ca221b01f2c83ba07bc6dc0cb9f8ee5e4a4b