[INFO] updating cached repository jakeswenson/otpcli [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/jakeswenson/otpcli [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/jakeswenson/otpcli" "work/ex/clippy-test-run/sources/stable/gh/jakeswenson/otpcli"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/jakeswenson/otpcli'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/jakeswenson/otpcli" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/jakeswenson/otpcli"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/jakeswenson/otpcli'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] fdd99b284eff7156454e8338040a0095fa06c6fc [INFO] sha for GitHub repo jakeswenson/otpcli: fdd99b284eff7156454e8338040a0095fa06c6fc [INFO] validating manifest of jakeswenson/otpcli 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 jakeswenson/otpcli 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 jakeswenson/otpcli [INFO] finished frobbing jakeswenson/otpcli [INFO] frobbed toml for jakeswenson/otpcli written to work/ex/clippy-test-run/sources/stable/gh/jakeswenson/otpcli/Cargo.toml [INFO] started frobbing jakeswenson/otpcli [INFO] finished frobbing jakeswenson/otpcli [INFO] frobbed toml for jakeswenson/otpcli written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/jakeswenson/otpcli/Cargo.toml [INFO] crate jakeswenson/otpcli 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 jakeswenson/otpcli 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/jakeswenson/otpcli:/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] 711fe70c65a259692ac28d64f5dcf0cc6c5372e5e8620e9c6572a95b4ec34618 [INFO] running `"docker" "start" "-a" "711fe70c65a259692ac28d64f5dcf0cc6c5372e5e8620e9c6572a95b4ec34618"` [INFO] [stderr] Compiling cc v1.0.20 [INFO] [stderr] Compiling serde v1.0.74 [INFO] [stderr] Checking base32 v0.3.1 [INFO] [stderr] Compiling structopt-derive v0.2.10 [INFO] [stderr] Compiling serde_derive v1.0.74 [INFO] [stderr] Compiling ring v0.13.2 [INFO] [stderr] Checking structopt v0.2.10 [INFO] [stderr] Checking toml v0.4.6 [INFO] [stderr] Checking otpcli v0.3.0 (/opt/crater/workdir) [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/lib.rs:105:9 [INFO] [stderr] | [INFO] [stderr] 105 | 100000u32, // 5 [INFO] [stderr] | ^^^^^^^^^ help: consider: `100_000u32` [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: long literal lacking separators [INFO] [stderr] --> src/lib.rs:106:9 [INFO] [stderr] | [INFO] [stderr] 106 | 1000000u32, // 6 [INFO] [stderr] | ^^^^^^^^^^ help: consider: `1_000_000u32` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/lib.rs:107:9 [INFO] [stderr] | [INFO] [stderr] 107 | 10000000u32, // 7 [INFO] [stderr] | ^^^^^^^^^^^ help: consider: `10_000_000u32` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/lib.rs:108:9 [INFO] [stderr] | [INFO] [stderr] 108 | 100000000u32, // 8 [INFO] [stderr] | ^^^^^^^^^^^^ help: consider: `100_000_000u32` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: returning the result of a let binding from a block. Consider returning the expression directly. [INFO] [stderr] --> src/lib.rs:138:5 [INFO] [stderr] | [INFO] [stderr] 138 | result [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::let_and_return)] on by default [INFO] [stderr] note: this expression can be directly returned [INFO] [stderr] --> src/lib.rs:136:18 [INFO] [stderr] | [INFO] [stderr] 136 | let result = high_num | mid_num | lower_num | bottom; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/lib.rs:105:9 [INFO] [stderr] | [INFO] [stderr] 105 | 100000u32, // 5 [INFO] [stderr] | ^^^^^^^^^ help: consider: `100_000u32` [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: long literal lacking separators [INFO] [stderr] --> src/lib.rs:106:9 [INFO] [stderr] | [INFO] [stderr] 106 | 1000000u32, // 6 [INFO] [stderr] | ^^^^^^^^^^ help: consider: `1_000_000u32` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/lib.rs:107:9 [INFO] [stderr] | [INFO] [stderr] 107 | 10000000u32, // 7 [INFO] [stderr] | ^^^^^^^^^^^ help: consider: `10_000_000u32` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/lib.rs:108:9 [INFO] [stderr] | [INFO] [stderr] 108 | 100000000u32, // 8 [INFO] [stderr] | ^^^^^^^^^^^^ help: consider: `100_000_000u32` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: returning the result of a let binding from a block. Consider returning the expression directly. [INFO] [stderr] --> src/lib.rs:138:5 [INFO] [stderr] | [INFO] [stderr] 138 | result [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::let_and_return)] on by default [INFO] [stderr] note: this expression can be directly returned [INFO] [stderr] --> src/lib.rs:136:18 [INFO] [stderr] | [INFO] [stderr] 136 | let result = high_num | mid_num | lower_num | bottom; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/lib.rs:151:66 [INFO] [stderr] | [INFO] [stderr] 151 | let code = totp(b"12345678901234567890", Duration::from_secs(1111111109), standard_time_window, 8, &SHA1); [INFO] [stderr] | ^^^^^^^^^^ help: consider: `1_111_111_109` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/lib.rs:154:66 [INFO] [stderr] | [INFO] [stderr] 154 | let code = totp(b"12345678901234567890", Duration::from_secs(1234567890), standard_time_window, 8, &SHA1); [INFO] [stderr] | ^^^^^^^^^^ help: consider: `1_234_567_890` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/lib.rs:57:26 [INFO] [stderr] | [INFO] [stderr] 57 | let config: Config = match meta_data.is_file() { [INFO] [stderr] | __________________________^ [INFO] [stderr] 58 | | true => { [INFO] [stderr] 59 | | let config = std::fs::read_to_string(config_path)?; [INFO] [stderr] 60 | | [INFO] [stderr] ... | [INFO] [stderr] 63 | | false => Config { totp: std::collections::HashMap::new() } [INFO] [stderr] 64 | | }; [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] help: consider using an if/else expression [INFO] [stderr] | [INFO] [stderr] 57 | let config: Config = if meta_data.is_file() { [INFO] [stderr] 58 | let config = std::fs::read_to_string(config_path)?; [INFO] [stderr] 59 | [INFO] [stderr] 60 | toml::from_str(&config).unwrap() [INFO] [stderr] 61 | } else { Config { totp: std::collections::HashMap::new() } }; [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: casting u8 to u32 may become silently lossy if types change [INFO] [stderr] --> src/lib.rs:125:16 [INFO] [stderr] | [INFO] [stderr] 125 | let high = bytes[0] as u32; [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: try: `u32::from(bytes[0])` [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: casting u8 to u32 may become silently lossy if types change [INFO] [stderr] --> src/lib.rs:128:15 [INFO] [stderr] | [INFO] [stderr] 128 | let mid = bytes[1] as u32; [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: try: `u32::from(bytes[1])` [INFO] [stderr] | [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] --> src/lib.rs:57:26 [INFO] [stderr] | [INFO] [stderr] 57 | let config: Config = match meta_data.is_file() { [INFO] [stderr] | __________________________^ [INFO] [stderr] 58 | | true => { [INFO] [stderr] 59 | | let config = std::fs::read_to_string(config_path)?; [INFO] [stderr] 60 | | [INFO] [stderr] [INFO] [stderr] ... | [INFO] [stderr] 63 | | false => Config { totp: std::collections::HashMap::new() } [INFO] [stderr] 64 | | }; [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] warning: casting u8 to u32 may become silently lossy if types change [INFO] [stderr] --> src/lib.rs:131:17 [INFO] [stderr] | [INFO] [stderr] 131 | let lower = bytes[2] as u32; [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: try: `u32::from(bytes[2])` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] help: consider using an if/else expression [INFO] [stderr] | [INFO] [stderr] 57 | let config: Config = if meta_data.is_file() { [INFO] [stderr] 58 | let config = std::fs::read_to_string(config_path)?; [INFO] [stderr] 59 | [INFO] [stderr] 60 | toml::from_str(&config).unwrap() [INFO] [stderr] 61 | } else { Config { totp: std::collections::HashMap::new() } }; [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: casting u8 to u32 may become silently lossy if types change [INFO] [stderr] --> src/lib.rs:134:18 [INFO] [stderr] | [INFO] [stderr] 134 | let bottom = bytes[3] as u32; [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: try: `u32::from(bytes[3])` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting u8 to u32 may become silently lossy if types change [INFO] [stderr] --> src/lib.rs:125:16 [INFO] [stderr] | [INFO] [stderr] 125 | let high = bytes[0] as u32; [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: try: `u32::from(bytes[0])` [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: casting u8 to u32 may become silently lossy if types change [INFO] [stderr] --> src/lib.rs:128:15 [INFO] [stderr] | [INFO] [stderr] 128 | let mid = bytes[1] as u32; [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: try: `u32::from(bytes[1])` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting u8 to u32 may become silently lossy if types change [INFO] [stderr] --> src/lib.rs:131:17 [INFO] [stderr] | [INFO] [stderr] 131 | let lower = bytes[2] as u32; [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: try: `u32::from(bytes[2])` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting u8 to u32 may become silently lossy if types change [INFO] [stderr] --> src/lib.rs:134:18 [INFO] [stderr] | [INFO] [stderr] 134 | let bottom = bytes[3] as u32; [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: try: `u32::from(bytes[3])` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: use of `expect` followed by a function call [INFO] [stderr] --> src/main.rs:31:18 [INFO] [stderr] | [INFO] [stderr] 31 | .expect(&format!("a TOTP config named `{}` was not found, did you add a secret with that name?", name)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| panic!("a TOTP config named `{}` was not found, did you add a secret with that name?", name))` [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: use of `expect` followed by a function call [INFO] [stderr] --> src/main.rs:31:18 [INFO] [stderr] | [INFO] [stderr] 31 | .expect(&format!("a TOTP config named `{}` was not found, did you add a secret with that name?", name)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| panic!("a TOTP config named `{}` was not found, did you add a secret with that name?", name))` [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] Finished dev [unoptimized + debuginfo] target(s) in 32.08s [INFO] running `"docker" "inspect" "711fe70c65a259692ac28d64f5dcf0cc6c5372e5e8620e9c6572a95b4ec34618"` [INFO] running `"docker" "rm" "-f" "711fe70c65a259692ac28d64f5dcf0cc6c5372e5e8620e9c6572a95b4ec34618"` [INFO] [stdout] 711fe70c65a259692ac28d64f5dcf0cc6c5372e5e8620e9c6572a95b4ec34618