[INFO] crate google-authenticator 0.1.5 is already in cache [INFO] extracting crate google-authenticator 0.1.5 into work/ex/clippy-test-run/sources/stable/reg/google-authenticator/0.1.5 [INFO] extracting crate google-authenticator 0.1.5 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/google-authenticator/0.1.5 [INFO] validating manifest of google-authenticator-0.1.5 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 google-authenticator-0.1.5 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 google-authenticator-0.1.5 [INFO] finished frobbing google-authenticator-0.1.5 [INFO] frobbed toml for google-authenticator-0.1.5 written to work/ex/clippy-test-run/sources/stable/reg/google-authenticator/0.1.5/Cargo.toml [INFO] started frobbing google-authenticator-0.1.5 [INFO] finished frobbing google-authenticator-0.1.5 [INFO] frobbed toml for google-authenticator-0.1.5 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/google-authenticator/0.1.5/Cargo.toml [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [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 google-authenticator-0.1.5 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-2/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/google-authenticator/0.1.5:/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] b3a695988094776d1f680d5ff9aab7a01c41e482ea77d5c55e223ba50508493e [INFO] running `"docker" "start" "-a" "b3a695988094776d1f680d5ff9aab7a01c41e482ea77d5c55e223ba50508493e"` [INFO] [stderr] Checking google-authenticator v0.1.5 (/opt/crater/workdir) [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/lib.rs:61:43 [INFO] [stderr] | [INFO] [stderr] 61 | assert_eq!(auth.get_code(secret, 1523610659 / 30).unwrap(), "224124"); [INFO] [stderr] | ^^^^^^^^^^ help: consider: `1_523_610_659` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unreadable_literal)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: value assigned to `index` is never read [INFO] [stderr] --> src/google_authenticator.rs:73:17 [INFO] [stderr] | [INFO] [stderr] 73 | let mut index:usize = 0; [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_assignments)] on by default [INFO] [stderr] [INFO] [stderr] warning: you should consider deriving a `Default` implementation for `google_authenticator::GoogleAuthenticator` [INFO] [stderr] --> src/google_authenticator.rs:47:5 [INFO] [stderr] | [INFO] [stderr] 47 | / pub fn new() -> GoogleAuthenticator{ [INFO] [stderr] 48 | | GoogleAuthenticator{ [INFO] [stderr] 49 | | code_len: 6, [INFO] [stderr] 50 | | _base32_alphabet: vec![ [INFO] [stderr] ... | [INFO] [stderr] 57 | | } [INFO] [stderr] 58 | | } [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] 40 | #[derive(Default)] [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/google_authenticator.rs:100:9 [INFO] [stderr] | [INFO] [stderr] 100 | / let mut message: u32 = times_slice; [INFO] [stderr] 101 | | if times_slice == 0 { [INFO] [stderr] 102 | | message = (f64::from_bits(SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs()) / 30.0).floor() as u32; [INFO] [stderr] 103 | | } [INFO] [stderr] | |_________^ help: it is more idiomatic to write: `let message = if times_slice == 0 { (f64::from_bits(SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs()) / 30.0).floor() as u32 } else { times_slice };` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_let_if_seq)] on by default [INFO] [stderr] = note: you might not need `mut` at all [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/google_authenticator.rs:120:9 [INFO] [stderr] | [INFO] [stderr] 120 | code = code % 1_000_000u32; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `code %= 1_000_000u32` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::assign_op_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/google_authenticator.rs:142:9 [INFO] [stderr] | [INFO] [stderr] 142 | / let mut curr_time_slice: u32 = time_slice; [INFO] [stderr] 143 | | if time_slice == 0 { [INFO] [stderr] 144 | | curr_time_slice = (f64::from_bits(SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs()) / 30.0).floor() as u32; [INFO] [stderr] 145 | | } [INFO] [stderr] | |_________^ help: it is more idiomatic to write: `let curr_time_slice = if time_slice == 0 { (f64::from_bits(SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs()) / 30.0).floor() as u32 } else { time_slice };` [INFO] [stderr] | [INFO] [stderr] = note: you might not need `mut` at all [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq [INFO] [stderr] [INFO] [stderr] warning: value assigned to `index` is never read [INFO] [stderr] --> src/google_authenticator.rs:73:17 [INFO] [stderr] | [INFO] [stderr] 73 | let mut index:usize = 0; [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_assignments)] on by default [INFO] [stderr] [INFO] [stderr] warning: you should consider deriving a `Default` implementation for `google_authenticator::GoogleAuthenticator` [INFO] [stderr] --> src/google_authenticator.rs:47:5 [INFO] [stderr] | [INFO] [stderr] 47 | / pub fn new() -> GoogleAuthenticator{ [INFO] [stderr] 48 | | GoogleAuthenticator{ [INFO] [stderr] 49 | | code_len: 6, [INFO] [stderr] 50 | | _base32_alphabet: vec![ [INFO] [stderr] ... | [INFO] [stderr] 57 | | } [INFO] [stderr] 58 | | } [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] 40 | #[derive(Default)] [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/google_authenticator.rs:100:9 [INFO] [stderr] | [INFO] [stderr] 100 | / let mut message: u32 = times_slice; [INFO] [stderr] 101 | | if times_slice == 0 { [INFO] [stderr] 102 | | message = (f64::from_bits(SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs()) / 30.0).floor() as u32; [INFO] [stderr] 103 | | } [INFO] [stderr] | |_________^ help: it is more idiomatic to write: `let message = if times_slice == 0 { (f64::from_bits(SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs()) / 30.0).floor() as u32 } else { times_slice };` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_let_if_seq)] on by default [INFO] [stderr] = note: you might not need `mut` at all [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/google_authenticator.rs:120:9 [INFO] [stderr] | [INFO] [stderr] 120 | code = code % 1_000_000u32; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `code %= 1_000_000u32` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::assign_op_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/google_authenticator.rs:142:9 [INFO] [stderr] | [INFO] [stderr] 142 | / let mut curr_time_slice: u32 = time_slice; [INFO] [stderr] 143 | | if time_slice == 0 { [INFO] [stderr] 144 | | curr_time_slice = (f64::from_bits(SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs()) / 30.0).floor() as u32; [INFO] [stderr] 145 | | } [INFO] [stderr] | |_________^ help: it is more idiomatic to write: `let curr_time_slice = if time_slice == 0 { (f64::from_bits(SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs()) / 30.0).floor() as u32 } else { time_slice };` [INFO] [stderr] | [INFO] [stderr] = note: you might not need `mut` at all [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 1.10s [INFO] running `"docker" "inspect" "b3a695988094776d1f680d5ff9aab7a01c41e482ea77d5c55e223ba50508493e"` [INFO] running `"docker" "rm" "-f" "b3a695988094776d1f680d5ff9aab7a01c41e482ea77d5c55e223ba50508493e"` [INFO] [stdout] b3a695988094776d1f680d5ff9aab7a01c41e482ea77d5c55e223ba50508493e