[INFO] cloning repository https://github.com/0k/logchunk [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/0k/logchunk" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2F0k%2Flogchunk", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2F0k%2Flogchunk'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 7a57d57b5273eb5b33632d2058cf85eca46aa8a4 [INFO] linting 0k/logchunk against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2F0k%2Flogchunk" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/0k/logchunk [INFO] finished tweaking git repo https://github.com/0k/logchunk [INFO] tweaked toml for git repo https://github.com/0k/logchunk written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/0k/logchunk 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 git repo https://github.com/0k/logchunk 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] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded serde_derive v1.0.201 [INFO] [stderr] Downloaded fallible-streaming-iterator v0.1.9 [INFO] [stderr] Downloaded fallible-iterator v0.3.0 [INFO] [stderr] Downloaded hashlink v0.9.1 [INFO] [stderr] Downloaded anstyle-query v1.0.3 [INFO] [stderr] Downloaded clap_lex v0.7.0 [INFO] [stderr] Downloaded clap_derive v4.5.4 [INFO] [stderr] Downloaded crc32fast v1.4.0 [INFO] [stderr] Downloaded proc-macro2 v1.0.82 [INFO] [stderr] Downloaded clap v4.5.4 [INFO] [stderr] Downloaded cc v1.0.97 [INFO] [stderr] Downloaded serde v1.0.201 [INFO] [stderr] Downloaded miniz_oxide v0.7.2 [INFO] [stderr] Downloaded clap_builder v4.5.2 [INFO] [stderr] Downloaded rusqlite v0.31.0 [INFO] [stderr] Downloaded syn v2.0.63 [INFO] [stderr] Downloaded fern v0.6.2 [INFO] [stderr] Downloaded libsqlite3-sys v0.28.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 5dd429e7cd2011eb3a53d712b23bb425235e4bb678c39f6c0f63bc3a2ec94acb [INFO] running `Command { std: "docker" "start" "-a" "5dd429e7cd2011eb3a53d712b23bb425235e4bb678c39f6c0f63bc3a2ec94acb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "5dd429e7cd2011eb3a53d712b23bb425235e4bb678c39f6c0f63bc3a2ec94acb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "5dd429e7cd2011eb3a53d712b23bb425235e4bb678c39f6c0f63bc3a2ec94acb", kill_on_drop: false }` [INFO] [stdout] 5dd429e7cd2011eb3a53d712b23bb425235e4bb678c39f6c0f63bc3a2ec94acb [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 8261c0e601155b5a92e327947bb7c767a6d1a49fb7bbdab769f628e512f10b56 [INFO] running `Command { std: "docker" "start" "-a" "8261c0e601155b5a92e327947bb7c767a6d1a49fb7bbdab769f628e512f10b56", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.82 [INFO] [stderr] Compiling ahash v0.8.11 [INFO] [stderr] Checking once_cell v1.19.0 [INFO] [stderr] Checking utf8parse v0.2.1 [INFO] [stderr] Compiling vcpkg v0.2.15 [INFO] [stderr] Checking zerocopy v0.7.35 [INFO] [stderr] Compiling pkg-config v0.3.30 [INFO] [stderr] Compiling crc32fast v1.4.0 [INFO] [stderr] Checking anstyle-query v1.0.3 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling rustix v0.38.34 [INFO] [stderr] Checking bitflags v2.6.0 [INFO] [stderr] Compiling libc v0.2.153 [INFO] [stderr] Compiling time-core v0.1.2 [INFO] [stderr] Compiling num-conv v0.1.0 [INFO] [stderr] Checking linux-raw-sys v0.4.14 [INFO] [stderr] Checking clap_lex v0.7.0 [INFO] [stderr] Checking anstyle-parse v0.2.4 [INFO] [stderr] Checking powerfmt v0.2.0 [INFO] [stderr] Checking miniz_oxide v0.7.2 [INFO] [stderr] Compiling time-macros v0.2.18 [INFO] [stderr] Checking num_threads v0.1.6 [INFO] [stderr] Checking fallible-streaming-iterator v0.1.9 [INFO] [stderr] Checking deranged v0.3.11 [INFO] [stderr] Checking anstream v0.6.14 [INFO] [stderr] Checking iana-time-zone v0.1.60 [INFO] [stderr] Checking fallible-iterator v0.3.0 [INFO] [stderr] Checking fastrand v2.1.0 [INFO] [stderr] Checking fern v0.6.2 [INFO] [stderr] Checking clap_builder v4.5.2 [INFO] [stderr] Checking sha1 v0.10.6 [INFO] [stderr] Checking hashbrown v0.14.5 [INFO] [stderr] Checking colored v2.1.0 [INFO] [stderr] Checking glob v0.3.1 [INFO] [stderr] Compiling indoc v2.0.5 [INFO] [stderr] Checking flate2 v1.0.30 [INFO] [stderr] Checking chrono v0.4.38 [INFO] [stderr] Compiling quote v1.0.36 [INFO] [stderr] Compiling libsqlite3-sys v0.28.0 [INFO] [stderr] Compiling syn v2.0.63 [INFO] [stderr] Checking hashlink v0.9.1 [INFO] [stderr] Checking time v0.3.36 [INFO] [stderr] Checking rusqlite v0.31.0 [INFO] [stderr] Checking tempfile v3.10.1 [INFO] [stderr] Compiling clap_derive v4.5.4 [INFO] [stderr] Checking clap v4.5.4 [INFO] [stderr] Checking logchunk v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/cli/log.rs:4:25 [INFO] [stdout] | [INFO] [stdout] 4 | const DATE_FORMAT_STR: &'static str = [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/cli/log.rs:6:29 [INFO] [stdout] | [INFO] [stdout] 6 | const LOG_DIRECTIVE_REGEX: &'static str = [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/cli/log.rs:4:25 [INFO] [stdout] | [INFO] [stdout] 4 | const DATE_FORMAT_STR: &'static str = [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/cli/log.rs:6:29 [INFO] [stdout] | [INFO] [stdout] 6 | const LOG_DIRECTIVE_REGEX: &'static str = [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/cli/action/import.rs:7:21 [INFO] [stdout] | [INFO] [stdout] 7 | if e == "No content".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"No content"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/cli/log.rs:90:32 [INFO] [stdout] | [INFO] [stdout] 90 | let time_str = format!("{}", now.format(&dt_fmt).unwrap()).cyan(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `now.format(&dt_fmt).unwrap().to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/import.rs:224:21 [INFO] [stdout] | [INFO] [stdout] 224 | if e == "No content".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"No content"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/import.rs:403:8 [INFO] [stdout] | [INFO] [stdout] 403 | if !end_time.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `end_time.is_none()` [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: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/import.rs:302:40 [INFO] [stdout] | [INFO] [stdout] 302 | ... &caps[1], e.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/import.rs:308:24 [INFO] [stdout] | [INFO] [stdout] 308 | return Err(format!("Unexpected start line format")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Unexpected start line format".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/import.rs:338:40 [INFO] [stdout] | [INFO] [stdout] 338 | ... &caps[1], e.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/import.rs:342:40 [INFO] [stdout] | [INFO] [stdout] 342 | ... &caps[5], e.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/import.rs:346:40 [INFO] [stdout] | [INFO] [stdout] 346 | ... &caps[4], e.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/import.rs:358:40 [INFO] [stdout] | [INFO] [stdout] 358 | ... &caps[4], e.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/import.rs:362:40 [INFO] [stdout] | [INFO] [stdout] 362 | ... &caps[5], e.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/import.rs:366:40 [INFO] [stdout] | [INFO] [stdout] 366 | ... &caps[1], e.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/import.rs:378:40 [INFO] [stdout] | [INFO] [stdout] 378 | ... &caps[1], e.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/import.rs:382:40 [INFO] [stdout] | [INFO] [stdout] 382 | ... &caps[3], e.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/import.rs:394:40 [INFO] [stdout] | [INFO] [stdout] 394 | ... &caps[1], e.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/import.rs:399:24 [INFO] [stdout] | [INFO] [stdout] 399 | return Err(format!("Unexpected log line format")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Unexpected log line format".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/next.rs:215:34 [INFO] [stdout] | [INFO] [stdout] 215 | if let Some(log_file_date) = basename_log_file_split.last() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] = note: `#[warn(clippy::double_ended_iterator_last)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 215 - if let Some(log_file_date) = basename_log_file_split.last() { [INFO] [stdout] 215 + if let Some(log_file_date) = basename_log_file_split.next_back() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/next.rs:288:25 [INFO] [stdout] | [INFO] [stdout] 288 | let reader = if PathBuf::from_str(&cfile) [INFO] [stdout] | _________________________^ [INFO] [stdout] 289 | | .map_err(|e| e.to_string())? [INFO] [stdout] 290 | | .extension() [INFO] [stdout] 291 | | .map_or(false, |ext| ext == "gz") [INFO] [stdout] | |_____________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 291 - .map_or(false, |ext| ext == "gz") [INFO] [stdout] 291 + .is_some_and(|ext| ext == "gz") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/next.rs:304:22 [INFO] [stdout] | [INFO] [stdout] 304 | e.to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/next.rs:365:25 [INFO] [stdout] | [INFO] [stdout] 365 | let reader = if log_file_path.extension().map_or(false, |ext| ext == "gz") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 365 - let reader = if log_file_path.extension().map_or(false, |ext| ext == "gz") { [INFO] [stdout] 365 + let reader = if log_file_path.extension().is_some_and(|ext| ext == "gz") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/next.rs:417:9 [INFO] [stdout] | [INFO] [stdout] 417 | / if ! file_rotated && cfile != "" && cfile_first_line != "" { [INFO] [stdout] 418 | | if ! reached_cursor_file { [INFO] [stdout] 419 | | if log_file_name == cfile { [INFO] [stdout] 420 | | reached_cursor_file = true; [INFO] [stdout] ... | [INFO] [stdout] 426 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 417 ~ if ! file_rotated && cfile != "" && cfile_first_line != "" [INFO] [stdout] 418 ~ && ! reached_cursor_file { [INFO] [stdout] 419 | if log_file_name == cfile { [INFO] [stdout] ... [INFO] [stdout] 424 | } [INFO] [stdout] 425 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/next.rs:417:30 [INFO] [stdout] | [INFO] [stdout] 417 | if ! file_rotated && cfile != "" && cfile_first_line != "" { [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cfile.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/next.rs:417:45 [INFO] [stdout] | [INFO] [stdout] 417 | if ! file_rotated && cfile != "" && cfile_first_line != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cfile_first_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used with `bool::then` [INFO] [stdout] --> src/next.rs:450:33 [INFO] [stdout] | [INFO] [stdout] 450 | Ok(line) => re_first_line.is_match(&line).then(|| Ok((line_nb, line))), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `then_some` instead [INFO] [stdout] | [INFO] [stdout] 450 - Ok(line) => re_first_line.is_match(&line).then(|| Ok((line_nb, line))), [INFO] [stdout] 450 + Ok(line) => re_first_line.is_match(&line).then_some(Ok((line_nb, line))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/cli/action/import.rs:7:21 [INFO] [stdout] | [INFO] [stdout] 7 | if e == "No content".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"No content"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `skip(..).next()` on an iterator [INFO] [stdout] --> src/next.rs:526:44 [INFO] [stdout] | [INFO] [stdout] 526 | reader(&log_file_path)? [INFO] [stdout] | ____________________________________________^ [INFO] [stdout] 527 | | .skip((offset + first_match_line_nb - 1) as usize) [INFO] [stdout] 528 | | .next() [INFO] [stdout] | |_______________________________^ help: use `nth` instead: `.nth((offset + first_match_line_nb - 1) as usize)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stdout] = note: `#[warn(clippy::iter_skip_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used with `bool::then` [INFO] [stdout] --> src/next.rs:671:36 [INFO] [stdout] | [INFO] [stdout] 671 | ... return re_last_line.is_match(&line).then(|| Ok((line_nb, line))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `then_some` instead [INFO] [stdout] | [INFO] [stdout] 671 - return re_last_line.is_match(&line).then(|| Ok((line_nb, line))) [INFO] [stdout] 671 + return re_last_line.is_match(&line).then_some(Ok((line_nb, line))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/next.rs:809:18 [INFO] [stdout] | [INFO] [stdout] 809 | e.to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/next.rs:826:18 [INFO] [stdout] | [INFO] [stdout] 826 | e.to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/next.rs:838:51 [INFO] [stdout] | [INFO] [stdout] 838 | chrono::NaiveDateTime::parse_from_str(&content_last_datetime.as_str(), "%Y/%m/%d %H:%M:%S") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `content_last_datetime.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils.rs:78:37 [INFO] [stdout] | [INFO] [stdout] 78 | let result = normalize_path(&path); [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils.rs:82:37 [INFO] [stdout] | [INFO] [stdout] 82 | let result = normalize_path(&path); [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils.rs:86:37 [INFO] [stdout] | [INFO] [stdout] 86 | let result = normalize_path(&path); [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils.rs:90:37 [INFO] [stdout] | [INFO] [stdout] 90 | let result = normalize_path(&path); [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils.rs:94:37 [INFO] [stdout] | [INFO] [stdout] 94 | let result = normalize_path(&path); [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils.rs:98:37 [INFO] [stdout] | [INFO] [stdout] 98 | let result = normalize_path(&path); [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils.rs:110:37 [INFO] [stdout] | [INFO] [stdout] 110 | let result = normalize_path(&path); [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils.rs:129:37 [INFO] [stdout] | [INFO] [stdout] 129 | let result = normalize_path(&path); [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/cli/log.rs:90:32 [INFO] [stdout] | [INFO] [stdout] 90 | let time_str = format!("{}", now.format(&dt_fmt).unwrap()).cyan(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `now.format(&dt_fmt).unwrap().to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/import.rs:224:21 [INFO] [stdout] | [INFO] [stdout] 224 | if e == "No content".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"No content"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/import.rs:403:8 [INFO] [stdout] | [INFO] [stdout] 403 | if !end_time.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `end_time.is_none()` [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: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/import.rs:302:40 [INFO] [stdout] | [INFO] [stdout] 302 | ... &caps[1], e.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/import.rs:308:24 [INFO] [stdout] | [INFO] [stdout] 308 | return Err(format!("Unexpected start line format")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Unexpected start line format".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/import.rs:338:40 [INFO] [stdout] | [INFO] [stdout] 338 | ... &caps[1], e.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/import.rs:342:40 [INFO] [stdout] | [INFO] [stdout] 342 | ... &caps[5], e.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/import.rs:346:40 [INFO] [stdout] | [INFO] [stdout] 346 | ... &caps[4], e.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/import.rs:358:40 [INFO] [stdout] | [INFO] [stdout] 358 | ... &caps[4], e.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/import.rs:362:40 [INFO] [stdout] | [INFO] [stdout] 362 | ... &caps[5], e.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/import.rs:366:40 [INFO] [stdout] | [INFO] [stdout] 366 | ... &caps[1], e.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/import.rs:378:40 [INFO] [stdout] | [INFO] [stdout] 378 | ... &caps[1], e.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/import.rs:382:40 [INFO] [stdout] | [INFO] [stdout] 382 | ... &caps[3], e.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/import.rs:394:40 [INFO] [stdout] | [INFO] [stdout] 394 | ... &caps[1], e.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/import.rs:399:24 [INFO] [stdout] | [INFO] [stdout] 399 | return Err(format!("Unexpected log line format")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Unexpected log line format".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/next.rs:215:34 [INFO] [stdout] | [INFO] [stdout] 215 | if let Some(log_file_date) = basename_log_file_split.last() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] = note: `#[warn(clippy::double_ended_iterator_last)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 215 - if let Some(log_file_date) = basename_log_file_split.last() { [INFO] [stdout] 215 + if let Some(log_file_date) = basename_log_file_split.next_back() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/next.rs:288:25 [INFO] [stdout] | [INFO] [stdout] 288 | let reader = if PathBuf::from_str(&cfile) [INFO] [stdout] | _________________________^ [INFO] [stdout] 289 | | .map_err(|e| e.to_string())? [INFO] [stdout] 290 | | .extension() [INFO] [stdout] 291 | | .map_or(false, |ext| ext == "gz") [INFO] [stdout] | |_____________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 291 - .map_or(false, |ext| ext == "gz") [INFO] [stdout] 291 + .is_some_and(|ext| ext == "gz") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/next.rs:304:22 [INFO] [stdout] | [INFO] [stdout] 304 | e.to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/next.rs:365:25 [INFO] [stdout] | [INFO] [stdout] 365 | let reader = if log_file_path.extension().map_or(false, |ext| ext == "gz") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 365 - let reader = if log_file_path.extension().map_or(false, |ext| ext == "gz") { [INFO] [stdout] 365 + let reader = if log_file_path.extension().is_some_and(|ext| ext == "gz") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/next.rs:417:9 [INFO] [stdout] | [INFO] [stdout] 417 | / if ! file_rotated && cfile != "" && cfile_first_line != "" { [INFO] [stdout] 418 | | if ! reached_cursor_file { [INFO] [stdout] 419 | | if log_file_name == cfile { [INFO] [stdout] 420 | | reached_cursor_file = true; [INFO] [stdout] ... | [INFO] [stdout] 426 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 417 ~ if ! file_rotated && cfile != "" && cfile_first_line != "" [INFO] [stdout] 418 ~ && ! reached_cursor_file { [INFO] [stdout] 419 | if log_file_name == cfile { [INFO] [stdout] ... [INFO] [stdout] 424 | } [INFO] [stdout] 425 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/next.rs:417:30 [INFO] [stdout] | [INFO] [stdout] 417 | if ! file_rotated && cfile != "" && cfile_first_line != "" { [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cfile.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/next.rs:417:45 [INFO] [stdout] | [INFO] [stdout] 417 | if ! file_rotated && cfile != "" && cfile_first_line != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cfile_first_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used with `bool::then` [INFO] [stdout] --> src/next.rs:450:33 [INFO] [stdout] | [INFO] [stdout] 450 | Ok(line) => re_first_line.is_match(&line).then(|| Ok((line_nb, line))), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `then_some` instead [INFO] [stdout] | [INFO] [stdout] 450 - Ok(line) => re_first_line.is_match(&line).then(|| Ok((line_nb, line))), [INFO] [stdout] 450 + Ok(line) => re_first_line.is_match(&line).then_some(Ok((line_nb, line))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `skip(..).next()` on an iterator [INFO] [stdout] --> src/next.rs:526:44 [INFO] [stdout] | [INFO] [stdout] 526 | reader(&log_file_path)? [INFO] [stdout] | ____________________________________________^ [INFO] [stdout] 527 | | .skip((offset + first_match_line_nb - 1) as usize) [INFO] [stdout] 528 | | .next() [INFO] [stdout] | |_______________________________^ help: use `nth` instead: `.nth((offset + first_match_line_nb - 1) as usize)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stdout] = note: `#[warn(clippy::iter_skip_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used with `bool::then` [INFO] [stdout] --> src/next.rs:671:36 [INFO] [stdout] | [INFO] [stdout] 671 | ... return re_last_line.is_match(&line).then(|| Ok((line_nb, line))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `then_some` instead [INFO] [stdout] | [INFO] [stdout] 671 - return re_last_line.is_match(&line).then(|| Ok((line_nb, line))) [INFO] [stdout] 671 + return re_last_line.is_match(&line).then_some(Ok((line_nb, line))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/next.rs:809:18 [INFO] [stdout] | [INFO] [stdout] 809 | e.to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/next.rs:826:18 [INFO] [stdout] | [INFO] [stdout] 826 | e.to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/next.rs:838:51 [INFO] [stdout] | [INFO] [stdout] 838 | chrono::NaiveDateTime::parse_from_str(&content_last_datetime.as_str(), "%Y/%m/%d %H:%M:%S") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `content_last_datetime.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 6.98s [INFO] running `Command { std: "docker" "inspect" "8261c0e601155b5a92e327947bb7c767a6d1a49fb7bbdab769f628e512f10b56", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8261c0e601155b5a92e327947bb7c767a6d1a49fb7bbdab769f628e512f10b56", kill_on_drop: false }` [INFO] [stdout] 8261c0e601155b5a92e327947bb7c767a6d1a49fb7bbdab769f628e512f10b56