[INFO] crate linefeed 0.5.4 is already in cache [INFO] extracting crate linefeed 0.5.4 into work/ex/clippy-test-run/sources/stable/reg/linefeed/0.5.4 [INFO] extracting crate linefeed 0.5.4 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/linefeed/0.5.4 [INFO] validating manifest of linefeed-0.5.4 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 linefeed-0.5.4 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 linefeed-0.5.4 [INFO] finished frobbing linefeed-0.5.4 [INFO] frobbed toml for linefeed-0.5.4 written to work/ex/clippy-test-run/sources/stable/reg/linefeed/0.5.4/Cargo.toml [INFO] started frobbing linefeed-0.5.4 [INFO] finished frobbing linefeed-0.5.4 [INFO] frobbed toml for linefeed-0.5.4 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/linefeed/0.5.4/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 linefeed-0.5.4 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/linefeed/0.5.4:/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] e5013d221b1e68eb0b2e9f8ee1a530a344451b40871ede588abc6ffc445bb97c [INFO] running `"docker" "start" "-a" "e5013d221b1e68eb0b2e9f8ee1a530a344451b40871ede588abc6ffc445bb97c"` [INFO] [stderr] Checking smallstr v0.1.0 [INFO] [stderr] Compiling phf_generator v0.7.24 [INFO] [stderr] Compiling phf_codegen v0.7.24 [INFO] [stderr] Compiling terminfo v0.6.1 [INFO] [stderr] Checking mortal v0.1.5 [INFO] [stderr] Checking linefeed v0.5.4 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/complete.rs:211:29 [INFO] [stderr] | [INFO] [stderr] 211 | display: display, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `display` [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/complete.rs:212:29 [INFO] [stderr] | [INFO] [stderr] 212 | suffix: suffix, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `suffix` [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/inputrc.rs:95:13 [INFO] [stderr] | [INFO] [stderr] 95 | filename: filename, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `filename` [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/inputrc.rs:226:21 [INFO] [stderr] | [INFO] [stderr] 226 | then_group: then_group, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `then_group` [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/inputrc.rs:227:21 [INFO] [stderr] | [INFO] [stderr] 227 | else_group: else_group, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `else_group` [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/inputrc.rs:334:13 [INFO] [stderr] | [INFO] [stderr] 334 | line: line, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `line` [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/interface.rs:76:13 [INFO] [stderr] | [INFO] [stderr] 76 | term: term, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `term` [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/memory.rs:251:13 [INFO] [stderr] | [INFO] [stderr] 251 | size: size, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `size` [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/table.rs:57:13 [INFO] [stderr] | [INFO] [stderr] 57 | sizes: sizes, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `sizes` [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/table.rs:60:13 [INFO] [stderr] | [INFO] [stderr] 60 | rows: rows, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `rows` [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/table.rs:61:13 [INFO] [stderr] | [INFO] [stderr] 61 | horizontal: horizontal, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `horizontal` [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/table.rs:100:13 [INFO] [stderr] | [INFO] [stderr] 100 | stride: stride, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `stride` [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/complete.rs:211:29 [INFO] [stderr] | [INFO] [stderr] 211 | display: display, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `display` [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/complete.rs:212:29 [INFO] [stderr] | [INFO] [stderr] 212 | suffix: suffix, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `suffix` [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/inputrc.rs:95:13 [INFO] [stderr] | [INFO] [stderr] 95 | filename: filename, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `filename` [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/inputrc.rs:226:21 [INFO] [stderr] | [INFO] [stderr] 226 | then_group: then_group, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `then_group` [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/inputrc.rs:227:21 [INFO] [stderr] | [INFO] [stderr] 227 | else_group: else_group, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `else_group` [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/inputrc.rs:334:13 [INFO] [stderr] | [INFO] [stderr] 334 | line: line, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `line` [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/interface.rs:76:13 [INFO] [stderr] | [INFO] [stderr] 76 | term: term, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `term` [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/memory.rs:251:13 [INFO] [stderr] | [INFO] [stderr] 251 | size: size, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `size` [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/table.rs:57:13 [INFO] [stderr] | [INFO] [stderr] 57 | sizes: sizes, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `sizes` [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/table.rs:60:13 [INFO] [stderr] | [INFO] [stderr] 60 | rows: rows, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `rows` [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/table.rs:61:13 [INFO] [stderr] | [INFO] [stderr] 61 | horizontal: horizontal, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `horizontal` [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/table.rs:100:13 [INFO] [stderr] | [INFO] [stderr] 100 | stride: stride, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `stride` [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: All the struct fields are matched to a wildcard pattern, consider using `..`. [INFO] [stderr] --> src/prompter.rs:130:13 [INFO] [stderr] | [INFO] [stderr] 130 | InputState::ContinueSequence{expiry: _} => { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unneeded_field_pattern)] on by default [INFO] [stderr] = help: Try with `ContinueSequence { .. }` instead [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_field_pattern [INFO] [stderr] [INFO] [stderr] warning: this `else { if .. }` block can be collapsed [INFO] [stderr] --> src/reader.rs:967:16 [INFO] [stderr] | [INFO] [stderr] 967 | } else { [INFO] [stderr] | ________________^ [INFO] [stderr] 968 | | if !self.read_init_file_if_exists(term, user_init_file()) { [INFO] [stderr] 969 | | self.read_init_file_if_exists(term, system_init_file()); [INFO] [stderr] 970 | | } [INFO] [stderr] 971 | | } [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] 967 | } else if !self.read_init_file_if_exists(term, user_init_file()) { [INFO] [stderr] 968 | self.read_init_file_if_exists(term, system_init_file()); [INFO] [stderr] 969 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: All the struct fields are matched to a wildcard pattern, consider using `..`. [INFO] [stderr] --> src/prompter.rs:130:13 [INFO] [stderr] | [INFO] [stderr] 130 | InputState::ContinueSequence{expiry: _} => { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unneeded_field_pattern)] on by default [INFO] [stderr] = help: Try with `ContinueSequence { .. }` instead [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_field_pattern [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/writer.rs:26:23 [INFO] [stderr] | [INFO] [stderr] 26 | const COMPLETE_MORE: &'static str = "--More--"; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::const_static_lifetime)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: this `else { if .. }` block can be collapsed [INFO] [stderr] --> src/reader.rs:967:16 [INFO] [stderr] | [INFO] [stderr] 967 | } else { [INFO] [stderr] | ________________^ [INFO] [stderr] 968 | | if !self.read_init_file_if_exists(term, user_init_file()) { [INFO] [stderr] 969 | | self.read_init_file_if_exists(term, system_init_file()); [INFO] [stderr] 970 | | } [INFO] [stderr] 971 | | } [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] 967 | } else if !self.read_init_file_if_exists(term, user_init_file()) { [INFO] [stderr] 968 | self.read_init_file_if_exists(term, system_init_file()); [INFO] [stderr] 969 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/writer.rs:26:23 [INFO] [stderr] | [INFO] [stderr] 26 | const COMPLETE_MORE: &'static str = "--More--"; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::const_static_lifetime)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: defining a method called `from_str` on this type; consider implementing the `std::str::FromStr` trait or choosing a less ambiguous name [INFO] [stderr] --> src/command.rs:39:13 [INFO] [stderr] | [INFO] [stderr] 39 | / pub fn from_str(name: &'static str) -> Command { [INFO] [stderr] 40 | | Command::opt_from_str(name) [INFO] [stderr] 41 | | .unwrap_or_else(|| Command::Custom(Borrowed(name))) [INFO] [stderr] 42 | | } [INFO] [stderr] | |_____________^ [INFO] [stderr] ... [INFO] [stderr] 64 | / define_commands!{ [INFO] [stderr] 65 | | /// Abort history search [INFO] [stderr] 66 | | Abort => "abort", [INFO] [stderr] 67 | | /// Accepts the current input line [INFO] [stderr] ... | [INFO] [stderr] 146 | | YankPop => "yank-pop", [INFO] [stderr] 147 | | } [INFO] [stderr] | |_- in this macro invocation [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::should_implement_trait)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/complete.rs:82:23 [INFO] [stderr] | [INFO] [stderr] 82 | pub fn is_default(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/complete.rs:90:20 [INFO] [stderr] | [INFO] [stderr] 90 | pub fn is_some(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/complete.rs:98:20 [INFO] [stderr] | [INFO] [stderr] 98 | pub fn is_none(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: defining a method called `next` on this type; consider implementing the `std::iter::Iterator` trait or choosing a less ambiguous name [INFO] [stderr] --> src/memory.rs:386:5 [INFO] [stderr] | [INFO] [stderr] 386 | / pub fn next(&mut self) -> Option<&[char]> { [INFO] [stderr] 387 | | if self.line >= self.writer.size.lines { [INFO] [stderr] 388 | | None [INFO] [stderr] 389 | | } else { [INFO] [stderr] ... | [INFO] [stderr] 395 | | } [INFO] [stderr] 396 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stderr] [INFO] [stderr] warning: the function has a cyclomatic complexity of 65 [INFO] [stderr] --> src/prompter.rs:469:5 [INFO] [stderr] | [INFO] [stderr] 469 | / fn execute_command(&mut self, cmd: Command, n: i32, ch: char) -> io::Result<()> { [INFO] [stderr] 470 | | use command::Command::*; [INFO] [stderr] 471 | | [INFO] [stderr] 472 | | let mut category = cmd.category(); [INFO] [stderr] ... | [INFO] [stderr] 888 | | Ok(()) [INFO] [stderr] 889 | | } [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: defining a method called `from_str` on this type; consider implementing the `std::str::FromStr` trait or choosing a less ambiguous name [INFO] [stderr] --> src/command.rs:39:13 [INFO] [stderr] | [INFO] [stderr] 39 | / pub fn from_str(name: &'static str) -> Command { [INFO] [stderr] 40 | | Command::opt_from_str(name) [INFO] [stderr] 41 | | .unwrap_or_else(|| Command::Custom(Borrowed(name))) [INFO] [stderr] 42 | | } [INFO] [stderr] | |_____________^ [INFO] [stderr] ... [INFO] [stderr] 64 | / define_commands!{ [INFO] [stderr] 65 | | /// Abort history search [INFO] [stderr] 66 | | Abort => "abort", [INFO] [stderr] 67 | | /// Accepts the current input line [INFO] [stderr] ... | [INFO] [stderr] 146 | | YankPop => "yank-pop", [INFO] [stderr] 147 | | } [INFO] [stderr] | |_- in this macro invocation [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::should_implement_trait)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stderr] [INFO] [stderr] warning: called `skip(x).next()` on an iterator. This is more succinctly expressed by calling `nth(x)` [INFO] [stderr] --> src/prompter.rs:1138:32 [INFO] [stderr] | [INFO] [stderr] 1138 | if let Some(row) = table.by_ref().skip(offset).next() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::iter_skip_next)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/complete.rs:82:23 [INFO] [stderr] | [INFO] [stderr] 82 | pub fn is_default(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/complete.rs:90:20 [INFO] [stderr] | [INFO] [stderr] 90 | pub fn is_some(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/complete.rs:98:20 [INFO] [stderr] | [INFO] [stderr] 98 | pub fn is_none(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: defining a method called `next` on this type; consider implementing the `std::iter::Iterator` trait or choosing a less ambiguous name [INFO] [stderr] --> src/memory.rs:386:5 [INFO] [stderr] | [INFO] [stderr] 386 | / pub fn next(&mut self) -> Option<&[char]> { [INFO] [stderr] 387 | | if self.line >= self.writer.size.lines { [INFO] [stderr] 388 | | None [INFO] [stderr] 389 | | } else { [INFO] [stderr] ... | [INFO] [stderr] 395 | | } [INFO] [stderr] 396 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/table.rs:166:9 [INFO] [stderr] | [INFO] [stderr] 166 | (min_cols..max_cols + 1) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(min_cols..=max_cols)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::range_plus_one)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] warning: this `.fold` can be written more succinctly using another method [INFO] [stderr] --> src/table.rs:192:23 [INFO] [stderr] | [INFO] [stderr] 192 | if cols.iter().fold(0, |a, b| a + b) <= screen_width { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `.sum()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unnecessary_fold)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stderr] [INFO] [stderr] warning: the function has a cyclomatic complexity of 65 [INFO] [stderr] --> src/prompter.rs:469:5 [INFO] [stderr] | [INFO] [stderr] 469 | / fn execute_command(&mut self, cmd: Command, n: i32, ch: char) -> io::Result<()> { [INFO] [stderr] 470 | | use command::Command::*; [INFO] [stderr] 471 | | [INFO] [stderr] 472 | | let mut category = cmd.category(); [INFO] [stderr] ... | [INFO] [stderr] 888 | | Ok(()) [INFO] [stderr] 889 | | } [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: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/terminal.rs:173:5 [INFO] [stderr] | [INFO] [stderr] 173 | / unsafe fn cast_writer<'a>(writer: &'a mut TerminalWriter) [INFO] [stderr] 174 | | -> &'a mut TerminalWriteGuard<'a> { [INFO] [stderr] 175 | | &mut *(writer as *mut _ as *mut TerminalWriteGuard) [INFO] [stderr] 176 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] error: casting from `*mut (dyn terminal::TerminalWriter + 'a)` to a more-strictly-aligned pointer (`*mut mortal::TerminalWriteGuard<'a>`) [INFO] [stderr] --> src/terminal.rs:175:15 [INFO] [stderr] | [INFO] [stderr] 175 | &mut *(writer as *mut _ as *mut TerminalWriteGuard) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::cast_ptr_alignment)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_ptr_alignment [INFO] [stderr] [INFO] [stderr] warning: called `skip(x).next()` on an iterator. This is more succinctly expressed by calling `nth(x)` [INFO] [stderr] --> src/prompter.rs:1138:32 [INFO] [stderr] | [INFO] [stderr] 1138 | if let Some(row) = table.by_ref().skip(offset).next() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::iter_skip_next)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stderr] [INFO] [stderr] warning: this loop could be written as a `for` loop [INFO] [stderr] --> src/util.rs:325:33 [INFO] [stderr] | [INFO] [stderr] 325 | while let Some((ind, ch)) = chars.next() { [INFO] [stderr] | ^^^^^^^^^^^^ help: try: `for (ind, ch) in chars { .. }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::while_let_on_iterator)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stderr] [INFO] [stderr] warning: Calling `subsec_millis()` is more concise than this calculation [INFO] [stderr] --> src/variables.rs:192:22 [INFO] [stderr] | [INFO] [stderr] 192 | let ms = (t.subsec_nanos() / 1_000_000) as i32; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `t.subsec_millis()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::duration_subsec)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#duration_subsec [INFO] [stderr] [INFO] [stderr] warning: consider using `Option` instead of `Option>` or a custom enum if you need to distinguish all 3 cases [INFO] [stderr] --> src/variables.rs:200:31 [INFO] [stderr] | [INFO] [stderr] 200 | fn parse_duration(s: &str) -> Option> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::option_option)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_option [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/writer.rs:538:30 [INFO] [stderr] | [INFO] [stderr] 538 | match line[..pos.unwrap_or(line.len())].rfind(s) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| line.len())` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::or_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `or` followed by a function call [INFO] [stderr] --> src/writer.rs:582:50 [INFO] [stderr] | [INFO] [stderr] 582 | pos = pos.map(|n| n + found).or(Some(found)); [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: try this: `or_else(|| Some(found))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/table.rs:166:9 [INFO] [stderr] | [INFO] [stderr] 166 | (min_cols..max_cols + 1) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(min_cols..=max_cols)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::range_plus_one)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] warning: this `.fold` can be written more succinctly using another method [INFO] [stderr] --> src/table.rs:192:23 [INFO] [stderr] | [INFO] [stderr] 192 | if cols.iter().fold(0, |a, b| a + b) <= screen_width { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `.sum()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unnecessary_fold)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/terminal.rs:173:5 [INFO] [stderr] | [INFO] [stderr] 173 | / unsafe fn cast_writer<'a>(writer: &'a mut TerminalWriter) [INFO] [stderr] 174 | | -> &'a mut TerminalWriteGuard<'a> { [INFO] [stderr] 175 | | &mut *(writer as *mut _ as *mut TerminalWriteGuard) [INFO] [stderr] 176 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] error: casting from `*mut (dyn terminal::TerminalWriter + 'a)` to a more-strictly-aligned pointer (`*mut mortal::TerminalWriteGuard<'a>`) [INFO] [stderr] --> src/terminal.rs:175:15 [INFO] [stderr] | [INFO] [stderr] 175 | &mut *(writer as *mut _ as *mut TerminalWriteGuard) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::cast_ptr_alignment)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_ptr_alignment [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/writer.rs:1121:35 [INFO] [stderr] | [INFO] [stderr] 1121 | Some(pos) => (&prompt[..pos + 1], &prompt[pos + 1..]), [INFO] [stderr] | ^^^^^^^^^ help: use: `..=pos` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/writer.rs:1191:29 [INFO] [stderr] | [INFO] [stderr] 1191 | pub fn is_out_of_bounds(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/writer.rs:1198:19 [INFO] [stderr] | [INFO] [stderr] 1198 | pub fn to_i32(&self) -> i32 { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: casting u8 to i32 may become silently lossy if types change [INFO] [stderr] --> src/writer.rs:1214:20 [INFO] [stderr] | [INFO] [stderr] 1214 | Digit::Num(n as i32) [INFO] [stderr] | ^^^^^^^^ help: try: `i32::from(n)` [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: this loop could be written as a `for` loop [INFO] [stderr] --> src/util.rs:325:33 [INFO] [stderr] | [INFO] [stderr] 325 | while let Some((ind, ch)) = chars.next() { [INFO] [stderr] | ^^^^^^^^^^^^ help: try: `for (ind, ch) in chars { .. }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::while_let_on_iterator)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/writer.rs:1339:1 [INFO] [stderr] | [INFO] [stderr] 1339 | / pub(crate) fn display_str<'a>(s: &'a str, style: Display) -> Cow<'a, str> { [INFO] [stderr] 1340 | | if s.chars().all(|ch| display(ch, style) == DisplaySequence::Char(ch)) { [INFO] [stderr] 1341 | | Borrowed(s) [INFO] [stderr] 1342 | | } else { [INFO] [stderr] 1343 | | Owned(s.chars().flat_map(|ch| display(ch, style)).collect()) [INFO] [stderr] 1344 | | } [INFO] [stderr] 1345 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: Calling `subsec_millis()` is more concise than this calculation [INFO] [stderr] --> src/variables.rs:192:22 [INFO] [stderr] | [INFO] [stderr] 192 | let ms = (t.subsec_nanos() / 1_000_000) as i32; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `t.subsec_millis()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::duration_subsec)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#duration_subsec [INFO] [stderr] [INFO] [stderr] warning: consider using `Option` instead of `Option>` or a custom enum if you need to distinguish all 3 cases [INFO] [stderr] --> src/variables.rs:200:31 [INFO] [stderr] | [INFO] [stderr] 200 | fn parse_duration(s: &str) -> Option> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::option_option)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_option [INFO] [stderr] [INFO] [stderr] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] error: Could not compile `linefeed`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/writer.rs:538:30 [INFO] [stderr] | [INFO] [stderr] 538 | match line[..pos.unwrap_or(line.len())].rfind(s) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| line.len())` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::or_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `or` followed by a function call [INFO] [stderr] --> src/writer.rs:582:50 [INFO] [stderr] | [INFO] [stderr] 582 | pos = pos.map(|n| n + found).or(Some(found)); [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: try this: `or_else(|| Some(found))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/writer.rs:1121:35 [INFO] [stderr] | [INFO] [stderr] 1121 | Some(pos) => (&prompt[..pos + 1], &prompt[pos + 1..]), [INFO] [stderr] | ^^^^^^^^^ help: use: `..=pos` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/writer.rs:1191:29 [INFO] [stderr] | [INFO] [stderr] 1191 | pub fn is_out_of_bounds(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/writer.rs:1198:19 [INFO] [stderr] | [INFO] [stderr] 1198 | pub fn to_i32(&self) -> i32 { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: casting u8 to i32 may become silently lossy if types change [INFO] [stderr] --> src/writer.rs:1214:20 [INFO] [stderr] | [INFO] [stderr] 1214 | Digit::Num(n as i32) [INFO] [stderr] | ^^^^^^^^ help: try: `i32::from(n)` [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: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/writer.rs:1339:1 [INFO] [stderr] | [INFO] [stderr] 1339 | / pub(crate) fn display_str<'a>(s: &'a str, style: Display) -> Cow<'a, str> { [INFO] [stderr] 1340 | | if s.chars().all(|ch| display(ch, style) == DisplaySequence::Char(ch)) { [INFO] [stderr] 1341 | | Borrowed(s) [INFO] [stderr] 1342 | | } else { [INFO] [stderr] 1343 | | Owned(s.chars().flat_map(|ch| display(ch, style)).collect()) [INFO] [stderr] 1344 | | } [INFO] [stderr] 1345 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] error: Could not compile `linefeed`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "e5013d221b1e68eb0b2e9f8ee1a530a344451b40871ede588abc6ffc445bb97c"` [INFO] running `"docker" "rm" "-f" "e5013d221b1e68eb0b2e9f8ee1a530a344451b40871ede588abc6ffc445bb97c"` [INFO] [stdout] e5013d221b1e68eb0b2e9f8ee1a530a344451b40871ede588abc6ffc445bb97c