[INFO] fetching crate tsmatch 0.2.0... [INFO] linting tsmatch-0.2.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate tsmatch 0.2.0 into /workspace/builds/worker-6-tc1/source [INFO] started tweaking crates.io crate tsmatch 0.2.0 [INFO] finished tweaking crates.io crate tsmatch 0.2.0 [INFO] tweaked toml for crates.io crate tsmatch 0.2.0 written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate tsmatch 0.2.0 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate tsmatch 0.2.0 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 456bceab074d62730ab66aa84eeeb271ad0edf87b5a433e271b0d7245d6067bb [INFO] running `Command { std: "docker" "start" "-a" "456bceab074d62730ab66aa84eeeb271ad0edf87b5a433e271b0d7245d6067bb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "456bceab074d62730ab66aa84eeeb271ad0edf87b5a433e271b0d7245d6067bb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "456bceab074d62730ab66aa84eeeb271ad0edf87b5a433e271b0d7245d6067bb", kill_on_drop: false }` [INFO] [stdout] 456bceab074d62730ab66aa84eeeb271ad0edf87b5a433e271b0d7245d6067bb [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] ec591c4925de882d538d99f58750488d8fc05cb6c18910cc149022ee3a05b177 [INFO] running `Command { std: "docker" "start" "-a" "ec591c4925de882d538d99f58750488d8fc05cb6c18910cc149022ee3a05b177", kill_on_drop: false }` [INFO] [stderr] Checking tsmatch v0.2.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/pattern/trend.rs:18:16 [INFO] [stdout] | [INFO] [stdout] 18 | if segment.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!segment.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/pattern/trend.rs:67:8 [INFO] [stdout] | [INFO] [stdout] 67 | if out.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `out.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `TimeSeriesPattern` [INFO] [stdout] --> src/pattern/trend2.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | / pub fn new() -> Self { [INFO] [stdout] 19 | | Self { phases: Vec::new() } [INFO] [stdout] 20 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 14 + impl Default for TimeSeriesPattern [INFO] [stdout] 15 + where [INFO] [stdout] 16 + T: Copy + Ord + Debug, [INFO] [stdout] 17 + { [INFO] [stdout] 18 + fn default() -> Self { [INFO] [stdout] 19 + Self::new() [INFO] [stdout] 20 + } [INFO] [stdout] 21 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/pattern/trend2.rs:41:17 [INFO] [stdout] | [INFO] [stdout] 41 | assert!(self.phases.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.phases.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/pattern/trend2.rs:84:21 [INFO] [stdout] | [INFO] [stdout] 84 | view_start = view_start + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `view_start += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/pattern/trend2.rs:113:21 [INFO] [stdout] | [INFO] [stdout] 113 | view_start = view_start + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `view_start += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/pattern/trend.rs:18:16 [INFO] [stdout] | [INFO] [stdout] 18 | if segment.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!segment.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/utils/noise.rs:3:30 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn remove_small_segments<'a, 'b, T>( [INFO] [stdout] | ^^ [INFO] [stdout] 4 | segments: &'a [Segment<'b, T>], [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 3 ~ pub fn remove_small_segments<'b, T>( [INFO] [stdout] 4 ~ segments: &[Segment<'b, T>], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/utils/noise.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | / segments [INFO] [stdout] 8 | | .into_iter() [INFO] [stdout] 9 | | .filter(|x| x.len() > threshold) [INFO] [stdout] 10 | | .map(|x| *x) [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 7 ~ segments [INFO] [stdout] 8 + .into_iter() [INFO] [stdout] 9 + .filter(|x| x.len() > threshold).copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/pattern/trend.rs:67:8 [INFO] [stdout] | [INFO] [stdout] 67 | if out.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `out.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/utils/noise.rs:8:10 [INFO] [stdout] | [INFO] [stdout] 8 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `TimeSeriesPattern` [INFO] [stdout] --> src/pattern/trend2.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | / pub fn new() -> Self { [INFO] [stdout] 19 | | Self { phases: Vec::new() } [INFO] [stdout] 20 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 14 + impl Default for TimeSeriesPattern [INFO] [stdout] 15 + where [INFO] [stdout] 16 + T: Copy + Ord + Debug, [INFO] [stdout] 17 + { [INFO] [stdout] 18 + fn default() -> Self { [INFO] [stdout] 19 + Self::new() [INFO] [stdout] 20 + } [INFO] [stdout] 21 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/pattern/trend2.rs:41:17 [INFO] [stdout] | [INFO] [stdout] 41 | assert!(self.phases.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.phases.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/pattern/trend2.rs:84:21 [INFO] [stdout] | [INFO] [stdout] 84 | view_start = view_start + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `view_start += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/pattern/trend2.rs:113:21 [INFO] [stdout] | [INFO] [stdout] 113 | view_start = view_start + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `view_start += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/pattern/trend2.rs:198:17 [INFO] [stdout] | [INFO] [stdout] 198 | assert!(!pattern.matches(&samples10).is_ok()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `pattern.matches(&samples10).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/pattern/trend2.rs:199:17 [INFO] [stdout] | [INFO] [stdout] 199 | assert!(!pattern.matches(&samples11).is_ok()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `pattern.matches(&samples11).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/utils/noise.rs:3:30 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn remove_small_segments<'a, 'b, T>( [INFO] [stdout] | ^^ [INFO] [stdout] 4 | segments: &'a [Segment<'b, T>], [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 3 ~ pub fn remove_small_segments<'b, T>( [INFO] [stdout] 4 ~ segments: &[Segment<'b, T>], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/utils/noise.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | / segments [INFO] [stdout] 8 | | .into_iter() [INFO] [stdout] 9 | | .filter(|x| x.len() > threshold) [INFO] [stdout] 10 | | .map(|x| *x) [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 7 ~ segments [INFO] [stdout] 8 + .into_iter() [INFO] [stdout] 9 + .filter(|x| x.len() > threshold).copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/utils/noise.rs:8:10 [INFO] [stdout] | [INFO] [stdout] 8 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.29s [INFO] running `Command { std: "docker" "inspect" "ec591c4925de882d538d99f58750488d8fc05cb6c18910cc149022ee3a05b177", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ec591c4925de882d538d99f58750488d8fc05cb6c18910cc149022ee3a05b177", kill_on_drop: false }` [INFO] [stdout] ec591c4925de882d538d99f58750488d8fc05cb6c18910cc149022ee3a05b177