[INFO] updating cached repository stpettersens/talkingclock [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/stpettersens/talkingclock [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/stpettersens/talkingclock" "work/ex/clippy-test-run/sources/stable/gh/stpettersens/talkingclock"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/stpettersens/talkingclock'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/stpettersens/talkingclock" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/stpettersens/talkingclock"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/stpettersens/talkingclock'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] fbf619c92c9ebf4ef5bd3b375145089ef3b48917 [INFO] sha for GitHub repo stpettersens/talkingclock: fbf619c92c9ebf4ef5bd3b375145089ef3b48917 [INFO] validating manifest of stpettersens/talkingclock 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 stpettersens/talkingclock 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 stpettersens/talkingclock [INFO] finished frobbing stpettersens/talkingclock [INFO] frobbed toml for stpettersens/talkingclock written to work/ex/clippy-test-run/sources/stable/gh/stpettersens/talkingclock/Cargo.toml [INFO] started frobbing stpettersens/talkingclock [INFO] finished frobbing stpettersens/talkingclock [INFO] frobbed toml for stpettersens/talkingclock written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/stpettersens/talkingclock/Cargo.toml [INFO] crate stpettersens/talkingclock 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 stpettersens/talkingclock against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-5/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/stpettersens/talkingclock:/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] 59d0a5e6d33206721f1d333661367e7068428bad121e75161af29ce124c03fd1 [INFO] running `"docker" "start" "-a" "59d0a5e6d33206721f1d333661367e7068428bad121e75161af29ce124c03fd1"` [INFO] [stderr] Checking clioptions v0.1.0 [INFO] [stderr] Checking litepattern v0.1.0 [INFO] [stderr] Checking time v0.1.38 [INFO] [stderr] Checking litelocale v0.1.0 [INFO] [stderr] Checking chrono v0.4.0 [INFO] [stderr] Checking talkingclock v0.1.1 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/config.rs:22:13 [INFO] [stderr] | [INFO] [stderr] 22 | digital: digital, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `digital` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/config.rs:23:13 [INFO] [stderr] | [INFO] [stderr] 23 | _24hr: _24hr, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `_24hr` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/voice.rs:37:13 [INFO] [stderr] | [INFO] [stderr] 37 | _24hr: _24hr, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `_24hr` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/config.rs:22:13 [INFO] [stderr] | [INFO] [stderr] 22 | digital: digital, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `digital` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/config.rs:23:13 [INFO] [stderr] | [INFO] [stderr] 23 | _24hr: _24hr, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `_24hr` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/voice.rs:37:13 [INFO] [stderr] | [INFO] [stderr] 37 | _24hr: _24hr, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `_24hr` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: returning the result of a let binding from a block. Consider returning the expression directly. [INFO] [stderr] --> src/main.rs:68:5 [INFO] [stderr] | [INFO] [stderr] 68 | unit [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/main.rs:64:16 [INFO] [stderr] | [INFO] [stderr] 64 | let unit = match n { [INFO] [stderr] | ________________^ [INFO] [stderr] 65 | | Some(unit) => unit as usize, [INFO] [stderr] 66 | | None => 0 as usize, [INFO] [stderr] 67 | | }; [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: returning the result of a let binding from a block. Consider returning the expression directly. [INFO] [stderr] --> src/main.rs:68:5 [INFO] [stderr] | [INFO] [stderr] 68 | unit [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/main.rs:64:16 [INFO] [stderr] | [INFO] [stderr] 64 | let unit = match n { [INFO] [stderr] | ________________^ [INFO] [stderr] 65 | | Some(unit) => unit as usize, [INFO] [stderr] 66 | | None => 0 as usize, [INFO] [stderr] 67 | | }; [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: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/voice.rs:41:9 [INFO] [stderr] | [INFO] [stderr] 41 | / let mut synth = false; [INFO] [stderr] 42 | | if &self.voice[0..self.voice.len() - 1] == "synth" { [INFO] [stderr] 43 | | synth = true; [INFO] [stderr] 44 | | } [INFO] [stderr] | |_________^ help: it is more idiomatic to write: `let synth = if &self.voice[0..self.voice.len() - 1] == "synth" { true } else { false };` [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: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/voice.rs:48:9 [INFO] [stderr] | [INFO] [stderr] 48 | / let mut gender = "-f"; [INFO] [stderr] 49 | | if self.voice == "synthm" { [INFO] [stderr] 50 | | gender = "-m"; [INFO] [stderr] 51 | | } [INFO] [stderr] | |_________^ help: it is more idiomatic to write: `let gender = if self.voice == "synthm" { "-m" } else { "-f" };` [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: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/voice.rs:41:9 [INFO] [stderr] | [INFO] [stderr] 41 | / let mut synth = false; [INFO] [stderr] 42 | | if &self.voice[0..self.voice.len() - 1] == "synth" { [INFO] [stderr] 43 | | synth = true; [INFO] [stderr] 44 | | } [INFO] [stderr] | |_________^ help: it is more idiomatic to write: `let synth = if &self.voice[0..self.voice.len() - 1] == "synth" { true } else { false };` [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: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/voice.rs:48:9 [INFO] [stderr] | [INFO] [stderr] 48 | / let mut gender = "-f"; [INFO] [stderr] 49 | | if self.voice == "synthm" { [INFO] [stderr] 50 | | gender = "-m"; [INFO] [stderr] 51 | | } [INFO] [stderr] | |_________^ help: it is more idiomatic to write: `let gender = if self.voice == "synthm" { "-m" } else { "-f" };` [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: useless use of `vec!` [INFO] [stderr] --> src/voice.rs:70:18 [INFO] [stderr] | [INFO] [stderr] 70 | for m in vec!["its", &format!("{}", hrs), &format!("{}", mins), am_pm] { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&["its", &format!("{}", hrs), &format!("{}", mins), am_pm]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_vec)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stderr] [INFO] [stderr] warning: useless use of `vec!` [INFO] [stderr] --> src/voice.rs:70:18 [INFO] [stderr] | [INFO] [stderr] 70 | for m in vec!["its", &format!("{}", hrs), &format!("{}", mins), am_pm] { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&["its", &format!("{}", hrs), &format!("{}", mins), am_pm]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_vec)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stderr] [INFO] [stderr] warning: the function has a cyclomatic complexity of 26 [INFO] [stderr] --> src/main.rs:107:1 [INFO] [stderr] | [INFO] [stderr] 107 | / fn say_time(program: &str, timestr: String, conf: &Config, quiet: bool) { [INFO] [stderr] 108 | | let voice = Voice::new(&conf.get_voice(), conf.is_24hr()); [INFO] [stderr] 109 | | let locale = load_locale(&conf.get_locale()); [INFO] [stderr] 110 | | let _24hr: bool = conf.is_24hr(); [INFO] [stderr] ... | [INFO] [stderr] 212 | | exit(0); [INFO] [stderr] 213 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cyclomatic_complexity)] on by default [INFO] [stderr] = help: you could split it up into multiple smaller functions [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cyclomatic_complexity [INFO] [stderr] [INFO] [stderr] warning: the function has a cyclomatic complexity of 26 [INFO] [stderr] --> src/main.rs:107:1 [INFO] [stderr] | [INFO] [stderr] 107 | / fn say_time(program: &str, timestr: String, conf: &Config, quiet: bool) { [INFO] [stderr] 108 | | let voice = Voice::new(&conf.get_voice(), conf.is_24hr()); [INFO] [stderr] 109 | | let locale = load_locale(&conf.get_locale()); [INFO] [stderr] 110 | | let _24hr: bool = conf.is_24hr(); [INFO] [stderr] ... | [INFO] [stderr] 212 | | exit(0); [INFO] [stderr] 213 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cyclomatic_complexity)] on by default [INFO] [stderr] = help: you could split it up into multiple smaller functions [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cyclomatic_complexity [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/main.rs:113:5 [INFO] [stderr] | [INFO] [stderr] 113 | / let mut mins: usize = 0; [INFO] [stderr] 114 | | if timestr.is_empty() { [INFO] [stderr] 115 | | let now = Local::now(); [INFO] [stderr] 116 | | hrs24 = parse_unit(&format!("{}", now.format("%H"))); [INFO] [stderr] ... | [INFO] [stderr] 131 | | } [INFO] [stderr] 132 | | } [INFO] [stderr] | |_____^ help: it is more idiomatic to write: `let mins = if timestr.is_empty() { ..; parse_unit(&format!("{}", now.format("%M"))) } else { ..; 0 };` [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: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/main.rs:113:5 [INFO] [stderr] | [INFO] [stderr] 113 | / let mut mins: usize = 0; [INFO] [stderr] 114 | | if timestr.is_empty() { [INFO] [stderr] 115 | | let now = Local::now(); [INFO] [stderr] 116 | | hrs24 = parse_unit(&format!("{}", now.format("%H"))); [INFO] [stderr] ... | [INFO] [stderr] 131 | | } [INFO] [stderr] 132 | | } [INFO] [stderr] | |_____^ help: it is more idiomatic to write: `let mins = if timestr.is_empty() { ..; parse_unit(&format!("{}", now.format("%M"))) } else { ..; 0 };` [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 6.27s [INFO] running `"docker" "inspect" "59d0a5e6d33206721f1d333661367e7068428bad121e75161af29ce124c03fd1"` [INFO] running `"docker" "rm" "-f" "59d0a5e6d33206721f1d333661367e7068428bad121e75161af29ce124c03fd1"` [INFO] [stdout] 59d0a5e6d33206721f1d333661367e7068428bad121e75161af29ce124c03fd1