[INFO] cloning repository https://github.com/playauraai/fluid-grep [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/playauraai/fluid-grep" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fplayauraai%2Ffluid-grep", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fplayauraai%2Ffluid-grep'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 82cbdf56011fd1404cecbcaf2e947844bf1a287e [INFO] linting playauraai/fluid-grep against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fplayauraai%2Ffluid-grep" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] removed /workspace/builds/worker-0-tc1/source/.cargo/config.toml [INFO] started tweaking git repo https://github.com/playauraai/fluid-grep [INFO] removed 0 missing tests [INFO] finished tweaking git repo https://github.com/playauraai/fluid-grep [INFO] tweaked toml for git repo https://github.com/playauraai/fluid-grep written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/playauraai/fluid-grep 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/playauraai/fluid-grep 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] Downloading crates ... [INFO] [stderr] Downloaded tikv-jemallocator v0.6.1 [INFO] [stderr] Downloaded pcre2 v0.2.11 [INFO] [stderr] Downloaded syn v2.0.107 [INFO] [stderr] Downloaded pcre2-sys v0.2.10 [INFO] [stderr] Downloaded tikv-jemalloc-sys v0.6.1+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] d2ca154e4a459e6d46c0fde3a2aad767c10b83bf598c36afdddeb4e07fbfad5f [INFO] running `Command { std: "docker" "start" "-a" "d2ca154e4a459e6d46c0fde3a2aad767c10b83bf598c36afdddeb4e07fbfad5f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "d2ca154e4a459e6d46c0fde3a2aad767c10b83bf598c36afdddeb4e07fbfad5f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d2ca154e4a459e6d46c0fde3a2aad767c10b83bf598c36afdddeb4e07fbfad5f", kill_on_drop: false }` [INFO] [stdout] d2ca154e4a459e6d46c0fde3a2aad767c10b83bf598c36afdddeb4e07fbfad5f [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 668482dcd0be434a5e129c6374a03dff940a24b9875cc498c7383ef24d23c532 [INFO] running `Command { std: "docker" "start" "-a" "668482dcd0be434a5e129c6374a03dff940a24b9875cc498c7383ef24d23c532", kill_on_drop: false }` [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Checking grep-matcher v0.1.8 (/opt/rustwide/workdir/crates/matcher) [INFO] [stderr] Compiling serde v1.0.228 [INFO] [stderr] Compiling proc-macro2 v1.0.101 [INFO] [stderr] Compiling unicode-ident v1.0.20 [INFO] [stderr] Compiling quote v1.0.41 [INFO] [stderr] Compiling ripgrep v15.1.0 (/opt/rustwide/workdir) [INFO] [stderr] Checking lexopt v0.3.1 [INFO] [stderr] Checking encoding_rs_io v0.1.7 [INFO] [stderr] Checking textwrap v0.16.2 [INFO] [stderr] Checking glob v0.3.3 [INFO] [stderr] Checking memmap2 v0.9.9 [INFO] [stderr] Checking crossbeam-channel v0.5.15 [INFO] [stderr] Checking crossbeam-deque v0.8.6 [INFO] [stderr] Compiling pcre2-sys v0.2.10 [INFO] [stdout] warning: can be more succinctly written as a byte str [INFO] [stdout] --> crates/matcher/src/lib.rs:253:40 [INFO] [stdout] | [INFO] [stdout] 253 | LineTerminatorImp::CRLF => &[b'\r', b'\n'], [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `b"\r\n"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#byte_char_slices [INFO] [stdout] = note: `#[warn(clippy::byte_char_slices)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking pcre2 v0.2.11 [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/matcher/src/interpolate.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 31 | if replacement.get(1).map_or(false, |&b| b == b'$') { [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] 31 - if replacement.get(1).map_or(false, |&b| b == b'$') { [INFO] [stdout] 31 + if replacement.get(1).is_some_and(|&b| b == b'$') { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/matcher/src/interpolate.rs:109:11 [INFO] [stdout] | [INFO] [stdout] 109 | while replacement.get(cap_end).map_or(false, is_valid_cap_letter) { [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] 109 - while replacement.get(cap_end).map_or(false, is_valid_cap_letter) { [INFO] [stdout] 109 + while replacement.get(cap_end).is_some_and(is_valid_cap_letter) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/matcher/src/interpolate.rs:122:13 [INFO] [stdout] | [INFO] [stdout] 122 | if !replacement.get(cap_end).map_or(false, |&b| b == b'}') { [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] 122 - if !replacement.get(cap_end).map_or(false, |&b| b == b'}') { [INFO] [stdout] 122 + if !replacement.get(cap_end).is_some_and(|&b| b == b'}') { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> crates/matcher/src/interpolate.rs:139:5 [INFO] [stdout] | [INFO] [stdout] 139 | / match *b { [INFO] [stdout] 140 | | b'0'..=b'9' | b'a'..=b'z' | b'A'..=b'Z' | b'_' => true, [INFO] [stdout] 141 | | _ => false, [INFO] [stdout] 142 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 139 - match *b { [INFO] [stdout] 140 - b'0'..=b'9' | b'a'..=b'z' | b'A'..=b'Z' | b'_' => true, [INFO] [stdout] 141 - _ => false, [INFO] [stdout] 142 - } [INFO] [stdout] 139 + matches!(*b, b'0'..=b'9' | b'a'..=b'z' | b'A'..=b'Z' | b'_') [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CRLF` contains a capitalized acronym [INFO] [stdout] --> crates/matcher/src/lib.rs:205:5 [INFO] [stdout] | [INFO] [stdout] 205 | CRLF, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Crlf` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/matcher/src/lib.rs:264:9 [INFO] [stdout] | [INFO] [stdout] 264 | slice.last().map_or(false, |&b| b == self.as_byte()) [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] 264 - slice.last().map_or(false, |&b| b == self.as_byte()) [INFO] [stdout] 264 + slice.last().is_some_and(|&b| b == self.as_byte()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `NoCaptures` [INFO] [stdout] --> crates/matcher/src/lib.rs:473:5 [INFO] [stdout] | [INFO] [stdout] 473 | / pub fn new() -> NoCaptures { [INFO] [stdout] 474 | | NoCaptures(()) [INFO] [stdout] 475 | | } [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] 470 + impl Default for NoCaptures { [INFO] [stdout] 471 + fn default() -> Self { [INFO] [stdout] 472 + Self::new() [INFO] [stdout] 473 + } [INFO] [stdout] 474 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> crates/matcher/src/lib.rs:1133:6 [INFO] [stdout] | [INFO] [stdout] 1133 | impl<'a, M: Matcher> Matcher for &'a M { [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] 1133 - impl<'a, M: Matcher> Matcher for &'a M { [INFO] [stdout] 1133 + impl Matcher for &M { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking grep-pcre2 v0.1.9 (/opt/rustwide/workdir/crates/pcre2) [INFO] [stdout] warning: you should consider adding a `Default` implementation for `RegexMatcherBuilder` [INFO] [stdout] --> crates/pcre2/src/matcher.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | / pub fn new() -> RegexMatcherBuilder { [INFO] [stdout] 23 | | RegexMatcherBuilder { [INFO] [stdout] 24 | | builder: RegexBuilder::new(), [INFO] [stdout] 25 | | case_smart: false, [INFO] [stdout] ... | [INFO] [stdout] 30 | | } [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] 20 + impl Default for RegexMatcherBuilder { [INFO] [stdout] 21 + fn default() -> Self { [INFO] [stdout] 22 + Self::new() [INFO] [stdout] 23 + } [INFO] [stdout] 24 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> crates/pcre2/src/matcher.rs:340:9 [INFO] [stdout] | [INFO] [stdout] 340 | self.names.get(name).map(|i| *i) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `self.names.get(name).copied()` [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] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `RegexMatcherBuilder` [INFO] [stdout] --> crates/pcre2/src/matcher.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | / pub fn new() -> RegexMatcherBuilder { [INFO] [stdout] 23 | | RegexMatcherBuilder { [INFO] [stdout] 24 | | builder: RegexBuilder::new(), [INFO] [stdout] 25 | | case_smart: false, [INFO] [stdout] ... | [INFO] [stdout] 30 | | } [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] 20 + impl Default for RegexMatcherBuilder { [INFO] [stdout] 21 + fn default() -> Self { [INFO] [stdout] 22 + Self::new() [INFO] [stdout] 23 + } [INFO] [stdout] 24 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> crates/pcre2/src/matcher.rs:340:9 [INFO] [stdout] | [INFO] [stdout] 340 | self.names.get(name).map(|i| *i) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `self.names.get(name).copied()` [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] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> crates/pcre2/src/matcher.rs:495:13 [INFO] [stdout] | [INFO] [stdout] 495 | / match m { [INFO] [stdout] 496 | | LineMatchKind::Confirmed(_) => true, [INFO] [stdout] 497 | | _ => false, [INFO] [stdout] 498 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 495 - match m { [INFO] [stdout] 496 - LineMatchKind::Confirmed(_) => true, [INFO] [stdout] 497 - _ => false, [INFO] [stdout] 498 - } [INFO] [stdout] 495 + matches!(m, LineMatchKind::Confirmed(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking regex-automata v0.4.13 [INFO] [stderr] Compiling syn v2.0.107 [INFO] [stderr] Checking bstr v1.12.0 [INFO] [stderr] Checking regex v1.12.2 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stdout] warning: can be more succinctly written as a byte str [INFO] [stdout] --> crates/matcher/src/lib.rs:253:40 [INFO] [stdout] | [INFO] [stdout] 253 | LineTerminatorImp::CRLF => &[b'\r', b'\n'], [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `b"\r\n"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#byte_char_slices [INFO] [stdout] = note: `#[warn(clippy::byte_char_slices)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> crates/matcher/tests/util.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | self.names.get(name).map(|i| *i) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `self.names.get(name).copied()` [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] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/matcher/src/interpolate.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 31 | if replacement.get(1).map_or(false, |&b| b == b'$') { [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] 31 - if replacement.get(1).map_or(false, |&b| b == b'$') { [INFO] [stdout] 31 + if replacement.get(1).is_some_and(|&b| b == b'$') { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/matcher/src/interpolate.rs:109:11 [INFO] [stdout] | [INFO] [stdout] 109 | while replacement.get(cap_end).map_or(false, is_valid_cap_letter) { [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] 109 - while replacement.get(cap_end).map_or(false, is_valid_cap_letter) { [INFO] [stdout] 109 + while replacement.get(cap_end).is_some_and(is_valid_cap_letter) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/matcher/src/interpolate.rs:122:13 [INFO] [stdout] | [INFO] [stdout] 122 | if !replacement.get(cap_end).map_or(false, |&b| b == b'}') { [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] 122 - if !replacement.get(cap_end).map_or(false, |&b| b == b'}') { [INFO] [stdout] 122 + if !replacement.get(cap_end).is_some_and(|&b| b == b'}') { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> crates/matcher/src/interpolate.rs:139:5 [INFO] [stdout] | [INFO] [stdout] 139 | / match *b { [INFO] [stdout] 140 | | b'0'..=b'9' | b'a'..=b'z' | b'A'..=b'Z' | b'_' => true, [INFO] [stdout] 141 | | _ => false, [INFO] [stdout] 142 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 139 - match *b { [INFO] [stdout] 140 - b'0'..=b'9' | b'a'..=b'z' | b'A'..=b'Z' | b'_' => true, [INFO] [stdout] 141 - _ => false, [INFO] [stdout] 142 - } [INFO] [stdout] 139 + matches!(*b, b'0'..=b'9' | b'a'..=b'z' | b'A'..=b'Z' | b'_') [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CRLF` contains a capitalized acronym [INFO] [stdout] --> crates/matcher/src/lib.rs:205:5 [INFO] [stdout] | [INFO] [stdout] 205 | CRLF, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Crlf` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/matcher/src/lib.rs:264:9 [INFO] [stdout] | [INFO] [stdout] 264 | slice.last().map_or(false, |&b| b == self.as_byte()) [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] 264 - slice.last().map_or(false, |&b| b == self.as_byte()) [INFO] [stdout] 264 + slice.last().is_some_and(|&b| b == self.as_byte()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `NoCaptures` [INFO] [stdout] --> crates/matcher/src/lib.rs:473:5 [INFO] [stdout] | [INFO] [stdout] 473 | / pub fn new() -> NoCaptures { [INFO] [stdout] 474 | | NoCaptures(()) [INFO] [stdout] 475 | | } [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] 470 + impl Default for NoCaptures { [INFO] [stdout] 471 + fn default() -> Self { [INFO] [stdout] 472 + Self::new() [INFO] [stdout] 473 + } [INFO] [stdout] 474 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> crates/matcher/src/lib.rs:1133:6 [INFO] [stdout] | [INFO] [stdout] 1133 | impl<'a, M: Matcher> Matcher for &'a M { [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] 1133 - impl<'a, M: Matcher> Matcher for &'a M { [INFO] [stdout] 1133 + impl Matcher for &M { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking globset v0.4.18 (/opt/rustwide/workdir/crates/globset) [INFO] [stderr] Checking grep-searcher v0.1.16 (/opt/rustwide/workdir/crates/searcher) [INFO] [stderr] Checking grep-regex v0.1.14 (/opt/rustwide/workdir/crates/regex) [INFO] [stdout] warning: can be more succinctly written as a byte str [INFO] [stdout] --> crates/regex/src/non_matching.rs:142:57 [INFO] [stdout] | [INFO] [stdout] 142 | assert_eq!(sparse(&extract("a")), sparse_except(&[b'a'])); [INFO] [stdout] | ^^^^^^^ help: try: `b"a"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#byte_char_slices [INFO] [stdout] = note: `#[warn(clippy::byte_char_slices)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: can be more succinctly written as a byte str [INFO] [stdout] --> crates/regex/src/non_matching.rs:152:58 [INFO] [stdout] | [INFO] [stdout] 152 | assert_eq!(sparse(&extract(r"^")), sparse_except(&[b'\n'])); [INFO] [stdout] | ^^^^^^^^ help: try: `b"\n"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#byte_char_slices [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: can be more succinctly written as a byte str [INFO] [stdout] --> crates/regex/src/non_matching.rs:153:58 [INFO] [stdout] | [INFO] [stdout] 153 | assert_eq!(sparse(&extract(r"$")), sparse_except(&[b'\n'])); [INFO] [stdout] | ^^^^^^^^ help: try: `b"\n"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#byte_char_slices [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: can be more succinctly written as a byte str [INFO] [stdout] --> crates/regex/src/non_matching.rs:154:59 [INFO] [stdout] | [INFO] [stdout] 154 | assert_eq!(sparse(&extract(r"\A")), sparse_except(&[b'\n'])); [INFO] [stdout] | ^^^^^^^^ help: try: `b"\n"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#byte_char_slices [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: can be more succinctly written as a byte str [INFO] [stdout] --> crates/regex/src/non_matching.rs:155:59 [INFO] [stdout] | [INFO] [stdout] 155 | assert_eq!(sparse(&extract(r"\z")), sparse_except(&[b'\n'])); [INFO] [stdout] | ^^^^^^^^ help: try: `b"\n"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#byte_char_slices [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: can be more succinctly written as a byte str [INFO] [stdout] --> crates/regex/src/non_matching.rs:156:62 [INFO] [stdout] | [INFO] [stdout] 156 | assert_eq!(sparse(&extract(r"(?m)^")), sparse_except(&[b'\n'])); [INFO] [stdout] | ^^^^^^^^ help: try: `b"\n"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#byte_char_slices [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: can be more succinctly written as a byte str [INFO] [stdout] --> crates/regex/src/non_matching.rs:157:62 [INFO] [stdout] | [INFO] [stdout] 157 | assert_eq!(sparse(&extract(r"(?m)$")), sparse_except(&[b'\n'])); [INFO] [stdout] | ^^^^^^^^ help: try: `b"\n"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#byte_char_slices [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> crates/regex/src/ast.rs:56:22 [INFO] [stdout] | [INFO] [stdout] 56 | fn from_ast_impl(&mut self, ast: &Ast) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> crates/regex/src/ast.rs:92:27 [INFO] [stdout] | [INFO] [stdout] 92 | fn from_ast_class_set(&mut self, ast: &ast::ClassSet) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> crates/regex/src/ast.rs:107:32 [INFO] [stdout] | [INFO] [stdout] 107 | fn from_ast_class_set_item(&mut self, ast: &ast::ClassSetItem) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> crates/regex/src/ast.rs:134:25 [INFO] [stdout] | [INFO] [stdout] 134 | fn from_ast_literal(&mut self, ast: &ast::Literal) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/regex/src/config.rs:136:13 [INFO] [stdout] | [INFO] [stdout] 136 | / if let Some(lineterm) = self.line_terminator { [INFO] [stdout] 137 | | if has_line_terminator(lineterm, p) { [INFO] [stdout] 138 | | return false; [INFO] [stdout] 139 | | } [INFO] [stdout] 140 | | } [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] 136 ~ if let Some(lineterm) = self.line_terminator [INFO] [stdout] 137 ~ && has_line_terminator(lineterm, p) { [INFO] [stdout] 138 | return false; [INFO] [stdout] 139 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> crates/regex/src/config.rs:180:13 [INFO] [stdout] | [INFO] [stdout] 179 | let hir = Hir::alternation(alts); [INFO] [stdout] | --------------------------------- unnecessary `let` binding [INFO] [stdout] 180 | hir [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 179 ~ [INFO] [stdout] 180 ~ Hir::alternation(alts) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> crates/regex/src/config.rs:253:34 [INFO] [stdout] | [INFO] [stdout] 253 | .dfa_size_limit(Some(1 * (1 << 20))) [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider reducing it to: `((1 << 20))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/regex/src/literal.rs:72:9 [INFO] [stdout] | [INFO] [stdout] 72 | / if re.is_accelerated() { [INFO] [stdout] 73 | | if !chir.hir().properties().look_set().contains_word_unicode() { [INFO] [stdout] 74 | | log::trace!( [INFO] [stdout] 75 | | "skipping inner literal extraction, \ [INFO] [stdout] ... | [INFO] [stdout] 80 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 72 ~ if re.is_accelerated() [INFO] [stdout] 73 ~ && !chir.hir().properties().look_set().contains_word_unicode() { [INFO] [stdout] 74 | log::trace!( [INFO] [stdout] ... [INFO] [stdout] 78 | return InnerLiterals::none(); [INFO] [stdout] 79 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/regex/src/literal.rs:383:12 [INFO] [stdout] | [INFO] [stdout] 383 | if seq1 [INFO] [stdout] | ____________^ [INFO] [stdout] 384 | | .max_cross_len(&seq2) [INFO] [stdout] 385 | | .map_or(false, |len| len > self.limit_total) [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] 385 - .map_or(false, |len| len > self.limit_total) [INFO] [stdout] 385 + .is_some_and(|len| len > self.limit_total) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/regex/src/literal.rs:390:17 [INFO] [stdout] | [INFO] [stdout] 390 | assert!(seq1.len().map_or(true, |x| x <= self.limit_total)); [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_none_or` instead [INFO] [stdout] | [INFO] [stdout] 390 - assert!(seq1.len().map_or(true, |x| x <= self.limit_total)); [INFO] [stdout] 390 + assert!(seq1.len().is_none_or(|x| x <= self.limit_total)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/regex/src/literal.rs:399:12 [INFO] [stdout] | [INFO] [stdout] 399 | if seq1.max_union_len(seq2).map_or(false, |len| len > self.limit_total) [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] 399 - if seq1.max_union_len(seq2).map_or(false, |len| len > self.limit_total) [INFO] [stdout] 399 + if seq1.max_union_len(seq2).is_some_and(|len| len > self.limit_total) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/regex/src/literal.rs:419:16 [INFO] [stdout] | [INFO] [stdout] 419 | if seq1 [INFO] [stdout] | ________________^ [INFO] [stdout] 420 | | .max_union_len(seq2) [INFO] [stdout] 421 | | .map_or(false, |len| len > self.limit_total) [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] 421 - .map_or(false, |len| len > self.limit_total) [INFO] [stdout] 421 + .is_some_and(|len| len > self.limit_total) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/regex/src/literal.rs:427:17 [INFO] [stdout] | [INFO] [stdout] 427 | assert!(seq1.len().map_or(true, |x| x <= self.limit_total)); [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_none_or` instead [INFO] [stdout] | [INFO] [stdout] 427 - assert!(seq1.len().map_or(true, |x| x <= self.limit_total)); [INFO] [stdout] 427 + assert!(seq1.len().is_none_or(|x| x <= self.limit_total)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> crates/globset/src/fnv.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | self.0 = self.0 ^ u64::from(byte); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.0 ^= u64::from(byte)` [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: accessing first element with `self.tokens.get(0)` [INFO] [stdout] --> crates/globset/src/glob.rs:357:28 [INFO] [stdout] | [INFO] [stdout] 357 | let start = match *self.tokens.get(0)? { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `self.tokens.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> crates/regex/src/ast.rs:56:22 [INFO] [stdout] | [INFO] [stdout] 56 | fn from_ast_impl(&mut self, ast: &Ast) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> crates/regex/src/ast.rs:92:27 [INFO] [stdout] | [INFO] [stdout] 92 | fn from_ast_class_set(&mut self, ast: &ast::ClassSet) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> crates/regex/src/ast.rs:107:32 [INFO] [stdout] | [INFO] [stdout] 107 | fn from_ast_class_set_item(&mut self, ast: &ast::ClassSetItem) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> crates/regex/src/ast.rs:134:25 [INFO] [stdout] | [INFO] [stdout] 134 | fn from_ast_literal(&mut self, ast: &ast::Literal) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.tokens.get(0)` [INFO] [stdout] --> crates/globset/src/glob.rs:467:38 [INFO] [stdout] | [INFO] [stdout] 467 | let (start, entire) = match *self.tokens.get(0)? { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `self.tokens.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.tokens.get(0)` [INFO] [stdout] --> crates/globset/src/glob.rs:514:28 [INFO] [stdout] | [INFO] [stdout] 514 | let start = match *self.tokens.get(0)? { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `self.tokens.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/globset/src/glob.rs:581:19 [INFO] [stdout] | [INFO] [stdout] 581 | glob: &self.glob, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `self.glob` [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] --> crates/globset/src/glob.rs:687:39 [INFO] [stdout] | [INFO] [stdout] 687 | self.tokens_to_regex(options, &self, &mut re); [INFO] [stdout] | ^^^^^ help: change this to: `self` [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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> crates/globset/src/glob.rs:707:25 [INFO] [stdout] | [INFO] [stdout] 707 | re.push_str("."); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `re.push('.')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/globset/src/glob.rs:747:55 [INFO] [stdout] | [INFO] [stdout] 747 | self.tokens_to_regex(options, &pat, &mut altre); [INFO] [stdout] | ^^^^ help: change this to: `pat` [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: passing a unit value to a function [INFO] [stdout] --> crates/globset/src/glob.rs:857:20 [INFO] [stdout] | [INFO] [stdout] 857 | return Ok(pat.push(tok)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] = note: `#[warn(clippy::unit_arg)]` on by default [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 857 ~ return { [INFO] [stdout] 858 + let _: () = pat.push(tok); [INFO] [stdout] 859 + Ok(()) [INFO] [stdout] 860 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> crates/globset/src/glob.rs:872:18 [INFO] [stdout] | [INFO] [stdout] 872 | Some(ref pat) => Ok(!pat.is_empty()), [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 872 - Some(ref pat) => Ok(!pat.is_empty()), [INFO] [stdout] 872 + Some(pat) => Ok(!pat.is_empty()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> crates/globset/src/glob.rs:883:13 [INFO] [stdout] | [INFO] [stdout] 883 | Ok(self.branches.push(Tokens::default())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 883 ~ self.branches.push(Tokens::default()); [INFO] [stdout] 884 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/globset/src/glob.rs:909:17 [INFO] [stdout] | [INFO] [stdout] 909 | if !self.peek().map_or(true, is_separator) { [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_none_or` instead [INFO] [stdout] | [INFO] [stdout] 909 - if !self.peek().map_or(true, is_separator) { [INFO] [stdout] 909 + if !self.peek().is_none_or(is_separator) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/regex/src/config.rs:136:13 [INFO] [stdout] | [INFO] [stdout] 136 | / if let Some(lineterm) = self.line_terminator { [INFO] [stdout] 137 | | if has_line_terminator(lineterm, p) { [INFO] [stdout] 138 | | return false; [INFO] [stdout] 139 | | } [INFO] [stdout] 140 | | } [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] 136 ~ if let Some(lineterm) = self.line_terminator [INFO] [stdout] 137 ~ && has_line_terminator(lineterm, p) { [INFO] [stdout] 138 | return false; [INFO] [stdout] 139 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/globset/src/glob.rs:914:25 [INFO] [stdout] | [INFO] [stdout] 914 | assert!(self.bump().map_or(true, is_separator)); [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_none_or` instead [INFO] [stdout] | [INFO] [stdout] 914 - assert!(self.bump().map_or(true, is_separator)); [INFO] [stdout] 914 + assert!(self.bump().is_none_or(is_separator)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/globset/src/glob.rs:919:9 [INFO] [stdout] | [INFO] [stdout] 919 | / if !prev.map(is_separator).unwrap_or(false) { [INFO] [stdout] 920 | | if self.branches.len() <= 1 [INFO] [stdout] 921 | | || (prev != Some(',') && prev != Some('{')) [INFO] [stdout] ... | [INFO] [stdout] 927 | | } [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] 919 ~ if !prev.map(is_separator).unwrap_or(false) [INFO] [stdout] 920 ~ && (self.branches.len() <= 1 [INFO] [stdout] 921 ~ || (prev != Some(',') && prev != Some('{'))) [INFO] [stdout] 922 | { [INFO] [stdout] ... [INFO] [stdout] 925 | return Ok(()); [INFO] [stdout] 926 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> crates/regex/src/config.rs:180:13 [INFO] [stdout] | [INFO] [stdout] 179 | let hir = Hir::alternation(alts); [INFO] [stdout] | --------------------------------- unnecessary `let` binding [INFO] [stdout] 180 | hir [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 179 ~ [INFO] [stdout] 180 ~ Hir::alternation(alts) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> crates/globset/src/glob.rs:996:27 [INFO] [stdout] | [INFO] [stdout] 996 | return if self.opts.allow_unclosed_class == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.opts.allow_unclosed_class` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/globset/src/glob.rs:1022:43 [INFO] [stdout] | [INFO] [stdout] 1022 | add_to_last_range(&self.glob, r, '-')?; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `self.glob` [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 operation has no effect [INFO] [stdout] --> crates/regex/src/config.rs:253:34 [INFO] [stdout] | [INFO] [stdout] 253 | .dfa_size_limit(Some(1 * (1 << 20))) [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider reducing it to: `((1 << 20))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/globset/src/glob.rs:1034:29 [INFO] [stdout] | [INFO] [stdout] 1034 | ... &self.glob, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `self.glob` [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: you are using an explicit closure for copying elements [INFO] [stdout] --> crates/globset/src/glob.rs:1061:9 [INFO] [stdout] | [INFO] [stdout] 1061 | self.chars.peek().map(|&ch| ch) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `self.chars.peek().copied()` [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] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> crates/globset/src/pathutil.rs:50:23 [INFO] [stdout] | [INFO] [stdout] 50 | let last_dot_at = match name.rfind_byte(b'.') { [INFO] [stdout] | _______________________^ [INFO] [stdout] 51 | | None => return None, [INFO] [stdout] 52 | | Some(i) => i, [INFO] [stdout] 53 | | }; [INFO] [stdout] | |_____^ help: try instead: `name.rfind_byte(b'.')?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.as_ref().map(|s| &**s)` on an `Option` value [INFO] [stdout] --> crates/globset/src/lib.rs:207:9 [INFO] [stdout] | [INFO] [stdout] 207 | self.glob.as_ref().map(|s| &**s) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using as_deref: `self.glob.as_deref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_as_ref_deref [INFO] [stdout] = note: `#[warn(clippy::option_as_ref_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/regex/src/literal.rs:72:9 [INFO] [stdout] | [INFO] [stdout] 72 | / if re.is_accelerated() { [INFO] [stdout] 73 | | if !chir.hir().properties().look_set().contains_word_unicode() { [INFO] [stdout] 74 | | log::trace!( [INFO] [stdout] 75 | | "skipping inner literal extraction, \ [INFO] [stdout] ... | [INFO] [stdout] 80 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 72 ~ if re.is_accelerated() [INFO] [stdout] 73 ~ && !chir.hir().properties().look_set().contains_word_unicode() { [INFO] [stdout] 74 | log::trace!( [INFO] [stdout] ... [INFO] [stdout] 78 | return InnerLiterals::none(); [INFO] [stdout] 79 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `GlobSetBuilder` [INFO] [stdout] --> crates/globset/src/lib.rs:574:5 [INFO] [stdout] | [INFO] [stdout] 574 | / pub fn new() -> GlobSetBuilder { [INFO] [stdout] 575 | | GlobSetBuilder { pats: vec![] } [INFO] [stdout] 576 | | } [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] 570 + impl Default for GlobSetBuilder { [INFO] [stdout] 571 + fn default() -> Self { [INFO] [stdout] 572 + Self::new() [INFO] [stdout] 573 + } [INFO] [stdout] 574 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/globset/src/lib.rs:641:37 [INFO] [stdout] | [INFO] [stdout] 641 | if self.path.len() <= max { &*self.path } else { &self.path[..max] } [INFO] [stdout] | ^^^^^^^^^^^ help: try: `&self.path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/globset/src/lib.rs:646:13 [INFO] [stdout] | [INFO] [stdout] 646 | &*self.path [INFO] [stdout] | ^^^^^^^^^^^ help: try: `&self.path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> crates/globset/src/lib.rs:867:21 [INFO] [stdout] | [INFO] [stdout] 867 | for &(_, ref re) in regexes { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] = note: `#[warn(clippy::needless_borrowed_reference)]` on by default [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 867 - for &(_, ref re) in regexes { [INFO] [stdout] 867 + for (_, re) in regexes { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/regex/src/literal.rs:383:12 [INFO] [stdout] | [INFO] [stdout] 383 | if seq1 [INFO] [stdout] | ____________^ [INFO] [stdout] 384 | | .max_cross_len(&seq2) [INFO] [stdout] 385 | | .map_or(false, |len| len > self.limit_total) [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] 385 - .map_or(false, |len| len > self.limit_total) [INFO] [stdout] 385 + .is_some_and(|len| len > self.limit_total) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/regex/src/literal.rs:390:17 [INFO] [stdout] | [INFO] [stdout] 390 | assert!(seq1.len().map_or(true, |x| x <= self.limit_total)); [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_none_or` instead [INFO] [stdout] | [INFO] [stdout] 390 - assert!(seq1.len().map_or(true, |x| x <= self.limit_total)); [INFO] [stdout] 390 + assert!(seq1.len().is_none_or(|x| x <= self.limit_total)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/regex/src/literal.rs:399:12 [INFO] [stdout] | [INFO] [stdout] 399 | if seq1.max_union_len(seq2).map_or(false, |len| len > self.limit_total) [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] 399 - if seq1.max_union_len(seq2).map_or(false, |len| len > self.limit_total) [INFO] [stdout] 399 + if seq1.max_union_len(seq2).is_some_and(|len| len > self.limit_total) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/regex/src/literal.rs:419:16 [INFO] [stdout] | [INFO] [stdout] 419 | if seq1 [INFO] [stdout] | ________________^ [INFO] [stdout] 420 | | .max_union_len(seq2) [INFO] [stdout] 421 | | .map_or(false, |len| len > self.limit_total) [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] 421 - .map_or(false, |len| len > self.limit_total) [INFO] [stdout] 421 + .is_some_and(|len| len > self.limit_total) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/regex/src/literal.rs:427:17 [INFO] [stdout] | [INFO] [stdout] 427 | assert!(seq1.len().map_or(true, |x| x <= self.limit_total)); [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_none_or` instead [INFO] [stdout] | [INFO] [stdout] 427 - assert!(seq1.len().map_or(true, |x| x <= self.limit_total)); [INFO] [stdout] 427 + assert!(seq1.len().is_none_or(|x| x <= self.limit_total)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> crates/searcher/src/line_buffer.rs:560:22 [INFO] [stdout] | [INFO] [stdout] 560 | const SHERLOCK: &'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] --> crates/searcher/src/lines.rs:203:22 [INFO] [stdout] | [INFO] [stdout] 203 | const SHERLOCK: &'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] --> crates/searcher/src/searcher/glue.rs:362:22 [INFO] [stdout] | [INFO] [stdout] 362 | const SHERLOCK: &'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] --> crates/searcher/src/searcher/glue.rs:371:18 [INFO] [stdout] | [INFO] [stdout] 371 | const CODE: &'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] --> crates/searcher/src/searcher/glue.rs:1499:26 [INFO] [stdout] | [INFO] [stdout] 1499 | const SHERLOCK: &'static [u8] = b"\ [INFO] [stdout] | -^^^^^^^----- help: consider removing `'static`: `&[u8]` [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] [stderr] Checking grep-cli v0.1.12 (/opt/rustwide/workdir/crates/cli) [INFO] [stderr] Checking ignore v0.4.24 (/opt/rustwide/workdir/crates/ignore) [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> crates/regex/src/matcher.rs:642:13 [INFO] [stdout] | [INFO] [stdout] 642 | / match m { [INFO] [stdout] 643 | | LineMatchKind::Confirmed(_) => true, [INFO] [stdout] 644 | | _ => false, [INFO] [stdout] 645 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 642 - match m { [INFO] [stdout] 643 - LineMatchKind::Confirmed(_) => true, [INFO] [stdout] 644 - _ => false, [INFO] [stdout] 645 - } [INFO] [stdout] 642 + matches!(m, LineMatchKind::Confirmed(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> crates/regex/src/matcher.rs:648:13 [INFO] [stdout] | [INFO] [stdout] 648 | / match m { [INFO] [stdout] 649 | | LineMatchKind::Candidate(_) => true, [INFO] [stdout] 650 | | _ => false, [INFO] [stdout] 651 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 648 - match m { [INFO] [stdout] 649 - LineMatchKind::Candidate(_) => true, [INFO] [stdout] 650 - _ => false, [INFO] [stdout] 651 - } [INFO] [stdout] 648 + matches!(m, LineMatchKind::Candidate(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> crates/globset/benches/bench.rs:11:13 [INFO] [stdout] | [INFO] [stdout] 11 | const EXT: &'static str = "some/a/bigger/path/to/the/crazy/needle.txt"; [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] --> crates/globset/benches/bench.rs:12:17 [INFO] [stdout] | [INFO] [stdout] 12 | const EXT_PAT: &'static str = "*.txt"; [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] --> crates/globset/benches/bench.rs:14:15 [INFO] [stdout] | [INFO] [stdout] 14 | const SHORT: &'static str = "some/needle.txt"; [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] --> crates/globset/benches/bench.rs:15:19 [INFO] [stdout] | [INFO] [stdout] 15 | const SHORT_PAT: &'static str = "some/**/needle.txt"; [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] --> crates/globset/benches/bench.rs:17:14 [INFO] [stdout] | [INFO] [stdout] 17 | const LONG: &'static str = "some/a/bigger/path/to/the/crazy/needle.txt"; [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] --> crates/globset/benches/bench.rs:18:18 [INFO] [stdout] | [INFO] [stdout] 18 | const LONG_PAT: &'static str = "some/**/needle.txt"; [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] --> crates/globset/benches/bench.rs:75:26 [INFO] [stdout] | [INFO] [stdout] 75 | const MANY_SHORT_GLOBS: &'static [&'static str] = &[ [INFO] [stdout] | -^^^^^^^--------------- help: consider removing `'static`: `&[&'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] --> crates/globset/benches/bench.rs:75:36 [INFO] [stdout] | [INFO] [stdout] 75 | const MANY_SHORT_GLOBS: &'static [&'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] --> crates/globset/benches/bench.rs:93:27 [INFO] [stdout] | [INFO] [stdout] 93 | const MANY_SHORT_SEARCH: &'static str = "98m-blah.csv.idx"; [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: called `.iter().count()` on a `Vec` [INFO] [stdout] --> crates/globset/benches/bench.rs:112:29 [INFO] [stdout] | [INFO] [stdout] 112 | b.iter(|| assert_eq!(2, set.matches(MANY_SHORT_SEARCH).iter().count())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `set.matches(MANY_SHORT_SEARCH).len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_count [INFO] [stdout] = note: `#[warn(clippy::iter_count)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> crates/ignore/src/types.rs:483:22 [INFO] [stdout] | [INFO] [stdout] 483 | static MSG: &'static str = "adding a default type should never fail"; [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: this `impl` can be derived [INFO] [stdout] --> crates/searcher/src/line_buffer.rs:29:1 [INFO] [stdout] | [INFO] [stdout] 29 | / impl Default for BufferAllocation { [INFO] [stdout] 30 | | fn default() -> BufferAllocation { [INFO] [stdout] 31 | | BufferAllocation::Eager [INFO] [stdout] 32 | | } [INFO] [stdout] 33 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 17 + #[derive(Default)] [INFO] [stdout] 18 | pub(crate) enum BufferAllocation { [INFO] [stdout] 19 | /// Attempt to expand the size of the buffer until either at least the next [INFO] [stdout] ... [INFO] [stdout] 22 | /// This is the default. [INFO] [stdout] 23 ~ #[default] [INFO] [stdout] 24 ~ Eager, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/searcher/src/line_buffer.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 39 | io::Error::new(io::ErrorKind::Other, msg) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 39 - io::Error::new(io::ErrorKind::Other, msg) [INFO] [stdout] 39 + io::Error::other(msg) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> crates/searcher/src/line_buffer.rs:66:1 [INFO] [stdout] | [INFO] [stdout] 66 | / impl Default for BinaryDetection { [INFO] [stdout] 67 | | fn default() -> BinaryDetection { [INFO] [stdout] 68 | | BinaryDetection::None [INFO] [stdout] 69 | | } [INFO] [stdout] 70 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 51 + #[derive(Default)] [INFO] [stdout] 52 | pub(crate) enum BinaryDetection { [INFO] [stdout] 53 | /// No binary detection is performed. Data reported by the line buffer may [INFO] [stdout] 54 | /// contain arbitrary bytes. [INFO] [stdout] 55 ~ #[default] [INFO] [stdout] 56 ~ None, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> crates/searcher/src/line_buffer.rs:76:9 [INFO] [stdout] | [INFO] [stdout] 76 | / match *self { [INFO] [stdout] 77 | | BinaryDetection::Quit(_) => true, [INFO] [stdout] 78 | | _ => false, [INFO] [stdout] 79 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 76 - match *self { [INFO] [stdout] 77 - BinaryDetection::Quit(_) => true, [INFO] [stdout] 78 - _ => false, [INFO] [stdout] 79 - } [INFO] [stdout] 76 + matches!(*self, BinaryDetection::Quit(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `bytes.get(0)` [INFO] [stdout] --> crates/searcher/src/line_buffer.rs:546:15 [INFO] [stdout] | [INFO] [stdout] 546 | while bytes.get(0) == Some(&src) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `bytes.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/searcher/src/searcher/core.rs:111:31 [INFO] [stdout] | [INFO] [stdout] 111 | self.sink.binary_data(&self.searcher, binary_byte_offset) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.searcher` [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: unneeded `return` statement [INFO] [stdout] --> crates/searcher/src/searcher/core.rs:149:25 [INFO] [stdout] | [INFO] [stdout] 149 | Err(err) => return Err(S::Error::error_message(err)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 149 - Err(err) => return Err(S::Error::error_message(err)), [INFO] [stdout] 149 + Err(err) => Err(S::Error::error_message(err)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/searcher/src/searcher/core.rs:150:25 [INFO] [stdout] | [INFO] [stdout] 150 | Ok(None) => return Ok(None), [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 150 - Ok(None) => return Ok(None), [INFO] [stdout] 150 + Ok(None) => Ok(None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/searcher/src/searcher/core.rs:156:25 [INFO] [stdout] | [INFO] [stdout] 156 | self.sink.begin(&self.searcher) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.searcher` [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] --> crates/searcher/src/searcher/core.rs:165:13 [INFO] [stdout] | [INFO] [stdout] 165 | &self.searcher, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.searcher` [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: returning the result of a `let` binding from a block [INFO] [stdout] --> crates/searcher/src/searcher/core.rs:205:13 [INFO] [stdout] | [INFO] [stdout] 203 | / let consumed = [INFO] [stdout] 204 | | std::cmp::max(context_start, self.last_line_visited); [INFO] [stdout] | |_____________________________________________________________________- unnecessary `let` binding [INFO] [stdout] 205 | consumed [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 203 ~ [INFO] [stdout] 204 ~ std::cmp::max(context_start, self.last_line_visited) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/searcher/src/searcher/core.rs:373:20 [INFO] [stdout] | [INFO] [stdout] 373 | } else if self.config.passthru { [INFO] [stdout] | ____________________^ [INFO] [stdout] 374 | | if !self.sink_other_context(buf, &line)? { [INFO] [stdout] 375 | | return Ok(false); [INFO] [stdout] 376 | | } [INFO] [stdout] 377 | | } [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] 373 ~ } else if self.config.passthru [INFO] [stdout] 374 ~ && !self.sink_other_context(buf, &line)? { [INFO] [stdout] 375 | return Ok(false); [INFO] [stdout] 376 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/searcher/src/searcher/core.rs:537:13 [INFO] [stdout] | [INFO] [stdout] 537 | &self.searcher, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.searcher` [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] --> crates/searcher/src/searcher/core.rs:567:13 [INFO] [stdout] | [INFO] [stdout] 567 | &self.searcher, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.searcher` [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] --> crates/searcher/src/searcher/core.rs:598:13 [INFO] [stdout] | [INFO] [stdout] 598 | &self.searcher, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.searcher` [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] --> crates/searcher/src/searcher/core.rs:628:13 [INFO] [stdout] | [INFO] [stdout] 628 | &self.searcher, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.searcher` [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] --> crates/searcher/src/searcher/core.rs:657:37 [INFO] [stdout] | [INFO] [stdout] 657 | self.sink.context_break(&self.searcher) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.searcher` [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 `map_or` can be simplified [INFO] [stdout] --> crates/searcher/src/searcher/core.rs:711:9 [INFO] [stdout] | [INFO] [stdout] 711 | self.config.max_matches.map_or(false, |limit| self.count() >= limit) [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] 711 - self.config.max_matches.map_or(false, |limit| self.count() >= limit) [INFO] [stdout] 711 + self.config.max_matches.is_some_and(|limit| self.count() >= limit) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/searcher/src/searcher/glue.rs:69:9 [INFO] [stdout] | [INFO] [stdout] 69 | / if !already_binary { [INFO] [stdout] 70 | | if let Some(offset) = self.rdr.binary_byte_offset() { [INFO] [stdout] 71 | | if !self.core.binary_data(offset)? { [INFO] [stdout] 72 | | return Ok(false); [INFO] [stdout] ... | [INFO] [stdout] 75 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 69 ~ if !already_binary [INFO] [stdout] 70 ~ && let Some(offset) = self.rdr.binary_byte_offset() { [INFO] [stdout] 71 | if !self.core.binary_data(offset)? { [INFO] [stdout] 72 | return Ok(false); [INFO] [stdout] 73 | } [INFO] [stdout] 74 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/searcher/src/searcher/glue.rs:70:13 [INFO] [stdout] | [INFO] [stdout] 70 | / if let Some(offset) = self.rdr.binary_byte_offset() { [INFO] [stdout] 71 | | if !self.core.binary_data(offset)? { [INFO] [stdout] 72 | | return Ok(false); [INFO] [stdout] 73 | | } [INFO] [stdout] 74 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 70 ~ if let Some(offset) = self.rdr.binary_byte_offset() [INFO] [stdout] 71 ~ && !self.core.binary_data(offset)? { [INFO] [stdout] 72 | return Ok(false); [INFO] [stdout] 73 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> crates/ignore/src/gitignore.rs:708:18 [INFO] [stdout] | [INFO] [stdout] 708 | const ROOT: &'static str = "/home/foobar/rust/rg"; [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] --> crates/ignore/src/overrides.rs:190:18 [INFO] [stdout] | [INFO] [stdout] 190 | const ROOT: &'static str = "/home/andrew/foo"; [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: statics have by default a `'static` lifetime [INFO] [stdout] --> crates/ignore/src/types.rs:483:22 [INFO] [stdout] | [INFO] [stdout] 483 | static MSG: &'static str = "adding a default type should never fail"; [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: you should consider adding a `Default` implementation for `Searcher` [INFO] [stdout] --> crates/searcher/src/searcher/mod.rs:632:5 [INFO] [stdout] | [INFO] [stdout] 632 | / pub fn new() -> Searcher { [INFO] [stdout] 633 | | SearcherBuilder::new().build() [INFO] [stdout] 634 | | } [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] 627 + impl Default for Searcher { [INFO] [stdout] 628 + fn default() -> Self { [INFO] [stdout] 629 + Self::new() [INFO] [stdout] 630 + } [INFO] [stdout] 631 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/searcher/src/searcher/mod.rs:706:17 [INFO] [stdout] | [INFO] [stdout] 706 | &*self.multi_line_buffer.borrow(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&self.multi_line_buffer.borrow()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/searcher/src/searcher/mod.rs:755:17 [INFO] [stdout] | [INFO] [stdout] 755 | &*self.multi_line_buffer.borrow(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&self.multi_line_buffer.borrow()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/searcher/src/searcher/mod.rs:761:54 [INFO] [stdout] | [INFO] [stdout] 761 | let rdr = LineBufferReader::new(decoder, &mut *line_buffer); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `&mut line_buffer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/searcher/src/searcher/mod.rs:900:9 [INFO] [stdout] | [INFO] [stdout] 900 | / if let Some(line_term) = matcher.line_terminator() { [INFO] [stdout] 901 | | if line_term == self.line_terminator() { [INFO] [stdout] 902 | | return false; [INFO] [stdout] 903 | | } [INFO] [stdout] 904 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 900 ~ if let Some(line_term) = matcher.line_terminator() [INFO] [stdout] 901 ~ && line_term == self.line_terminator() { [INFO] [stdout] 902 | return false; [INFO] [stdout] 903 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/searcher/src/searcher/mod.rs:965:35 [INFO] [stdout] | [INFO] [stdout] 965 | read_from.read_to_end(&mut *buf).map_err(S::Error::error_io)?; [INFO] [stdout] | ^^^^^^^^^ help: try: `&mut buf` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/cli/src/decompress.rs:60:34 [INFO] [stdout] | [INFO] [stdout] 60 | CommandError::io(io::Error::new(io::ErrorKind::Other, err)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 60 - CommandError::io(io::Error::new(io::ErrorKind::Other, err)) [INFO] [stdout] 60 + CommandError::io(io::Error::other(err)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/searcher/src/searcher/mod.rs:990:34 [INFO] [stdout] | [INFO] [stdout] 990 | .read_to_end(&mut *buf) [INFO] [stdout] | ^^^^^^^^^ help: try: `&mut buf` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/cli/src/decompress.rs:66:30 [INFO] [stdout] | [INFO] [stdout] 66 | CommandError::io(io::Error::new(io::ErrorKind::Other, err)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 66 - CommandError::io(io::Error::new(io::ErrorKind::Other, err)) [INFO] [stdout] 66 + CommandError::io(io::Error::other(err)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/searcher/src/sink.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | io::Error::new(io::ErrorKind::Other, message.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 44 - io::Error::new(io::ErrorKind::Other, message.to_string()) [INFO] [stdout] 44 + io::Error::other(message.to_string()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> crates/searcher/src/sink.rs:225:6 [INFO] [stdout] | [INFO] [stdout] 225 | impl<'a, S: Sink> Sink for &'a mut S { [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] 225 - impl<'a, S: Sink> Sink for &'a mut S { [INFO] [stdout] 225 + impl Sink for &mut S { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/cli/src/decompress.rs:487:5 [INFO] [stdout] | [INFO] [stdout] 487 | return Err(CommandError::io(io::Error::new(io::ErrorKind::Other, msg))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 487 - return Err(CommandError::io(io::Error::new(io::ErrorKind::Other, msg))); [INFO] [stdout] 487 + Err(CommandError::io(io::Error::new(io::ErrorKind::Other, msg))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/cli/src/decompress.rs:464:37 [INFO] [stdout] | [INFO] [stdout] 464 | return Err(CommandError::io(io::Error::new( [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 465 | | io::ErrorKind::Other, [INFO] [stdout] 466 | | msg, [INFO] [stdout] 467 | | ))); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 464 ~ return Err(CommandError::io(io::Error::other( [INFO] [stdout] 465 ~ msg, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/searcher/src/sink.rs:566:35 [INFO] [stdout] | [INFO] [stdout] 566 | (self.0)(line_number, &matched) [INFO] [stdout] | ^^^^^^^^ help: change this to: `matched` [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 can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/cli/src/decompress.rs:487:33 [INFO] [stdout] | [INFO] [stdout] 487 | return Err(CommandError::io(io::Error::new(io::ErrorKind::Other, msg))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 487 - return Err(CommandError::io(io::Error::new(io::ErrorKind::Other, msg))); [INFO] [stdout] 487 + return Err(CommandError::io(io::Error::other(msg))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/cli/src/hostname.rs:52:20 [INFO] [stdout] | [INFO] [stdout] 52 | return Err(io::Error::new(io::ErrorKind::Other, msg)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 52 - return Err(io::Error::new(io::ErrorKind::Other, msg)); [INFO] [stdout] 52 + return Err(io::Error::other(msg)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/cli/src/hostname.rs:70:20 [INFO] [stdout] | [INFO] [stdout] 70 | return Err(io::Error::new(io::ErrorKind::Other, msg)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 70 - return Err(io::Error::new(io::ErrorKind::Other, msg)); [INFO] [stdout] 70 + return Err(io::Error::other(msg)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/cli/src/human.rs:67:9 [INFO] [stdout] | [INFO] [stdout] 67 | std::io::Error::new(std::io::ErrorKind::Other, size_err) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 67 - std::io::Error::new(std::io::ErrorKind::Other, size_err) [INFO] [stdout] 67 + std::io::Error::other(size_err) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/cli/src/pattern.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | io::Error::new(io::ErrorKind::Other, paterr) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 41 - io::Error::new(io::ErrorKind::Other, paterr) [INFO] [stdout] 41 + io::Error::other(paterr) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/cli/src/pattern.rs:85:9 [INFO] [stdout] | [INFO] [stdout] 85 | / io::Error::new( [INFO] [stdout] 86 | | io::ErrorKind::Other, [INFO] [stdout] 87 | | format!("{}: {}", path.display(), err), [INFO] [stdout] 88 | | ) [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 85 ~ io::Error::other( [INFO] [stdout] 86 ~ format!("{}: {}", path.display(), err), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/cli/src/pattern.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | / io::Error::new( [INFO] [stdout] 92 | | io::ErrorKind::Other, [INFO] [stdout] 93 | | format!("{}:{}", path.display(), err), [INFO] [stdout] 94 | | ) [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 91 ~ io::Error::other( [INFO] [stdout] 92 ~ format!("{}:{}", path.display(), err), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/cli/src/pattern.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 108 | io::Error::new(io::ErrorKind::Other, format!(":{}", err)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 108 - io::Error::new(io::ErrorKind::Other, format!(":{}", err)) [INFO] [stdout] 108 + io::Error::other(format!(":{}", err)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/cli/src/pattern.rs:151:29 [INFO] [stdout] | [INFO] [stdout] 151 | Err(err) => Err(io::Error::new( [INFO] [stdout] | _____________________________^ [INFO] [stdout] 152 | | io::ErrorKind::Other, [INFO] [stdout] 153 | | format!("{}: {}", line_number, err), [INFO] [stdout] 154 | | )), [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 151 ~ Err(err) => Err(io::Error::other( [INFO] [stdout] 152 ~ format!("{}: {}", line_number, err), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/cli/src/process.rs:76:17 [INFO] [stdout] | [INFO] [stdout] 76 | io::Error::new(io::ErrorKind::Other, cmderr) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 76 - io::Error::new(io::ErrorKind::Other, cmderr) [INFO] [stdout] 76 + io::Error::other(cmderr) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking grep-printer v0.3.1 (/opt/rustwide/workdir/crates/printer) [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/cli/src/decompress.rs:60:34 [INFO] [stdout] | [INFO] [stdout] 60 | CommandError::io(io::Error::new(io::ErrorKind::Other, err)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 60 - CommandError::io(io::Error::new(io::ErrorKind::Other, err)) [INFO] [stdout] 60 + CommandError::io(io::Error::other(err)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/cli/src/decompress.rs:66:30 [INFO] [stdout] | [INFO] [stdout] 66 | CommandError::io(io::Error::new(io::ErrorKind::Other, err)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 66 - CommandError::io(io::Error::new(io::ErrorKind::Other, err)) [INFO] [stdout] 66 + CommandError::io(io::Error::other(err)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/cli/src/decompress.rs:487:5 [INFO] [stdout] | [INFO] [stdout] 487 | return Err(CommandError::io(io::Error::new(io::ErrorKind::Other, msg))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 487 - return Err(CommandError::io(io::Error::new(io::ErrorKind::Other, msg))); [INFO] [stdout] 487 + Err(CommandError::io(io::Error::new(io::ErrorKind::Other, msg))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/cli/src/decompress.rs:464:37 [INFO] [stdout] | [INFO] [stdout] 464 | return Err(CommandError::io(io::Error::new( [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 465 | | io::ErrorKind::Other, [INFO] [stdout] 466 | | msg, [INFO] [stdout] 467 | | ))); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 464 ~ return Err(CommandError::io(io::Error::other( [INFO] [stdout] 465 ~ msg, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/cli/src/decompress.rs:487:33 [INFO] [stdout] | [INFO] [stdout] 487 | return Err(CommandError::io(io::Error::new(io::ErrorKind::Other, msg))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 487 - return Err(CommandError::io(io::Error::new(io::ErrorKind::Other, msg))); [INFO] [stdout] 487 + return Err(CommandError::io(io::Error::other(msg))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/cli/src/hostname.rs:52:20 [INFO] [stdout] | [INFO] [stdout] 52 | return Err(io::Error::new(io::ErrorKind::Other, msg)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 52 - return Err(io::Error::new(io::ErrorKind::Other, msg)); [INFO] [stdout] 52 + return Err(io::Error::other(msg)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/cli/src/hostname.rs:70:20 [INFO] [stdout] | [INFO] [stdout] 70 | return Err(io::Error::new(io::ErrorKind::Other, msg)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 70 - return Err(io::Error::new(io::ErrorKind::Other, msg)); [INFO] [stdout] 70 + return Err(io::Error::other(msg)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/cli/src/human.rs:67:9 [INFO] [stdout] | [INFO] [stdout] 67 | std::io::Error::new(std::io::ErrorKind::Other, size_err) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 67 - std::io::Error::new(std::io::ErrorKind::Other, size_err) [INFO] [stdout] 67 + std::io::Error::other(size_err) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/cli/src/pattern.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | io::Error::new(io::ErrorKind::Other, paterr) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 41 - io::Error::new(io::ErrorKind::Other, paterr) [INFO] [stdout] 41 + io::Error::other(paterr) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> crates/searcher/examples/search-stdin.rs:21:35 [INFO] [stdout] | [INFO] [stdout] 21 | return Err(From::from(format!("Usage: search-stdin "))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Usage: search-stdin ".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 can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/cli/src/pattern.rs:85:9 [INFO] [stdout] | [INFO] [stdout] 85 | / io::Error::new( [INFO] [stdout] 86 | | io::ErrorKind::Other, [INFO] [stdout] 87 | | format!("{}: {}", path.display(), err), [INFO] [stdout] 88 | | ) [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 85 ~ io::Error::other( [INFO] [stdout] 86 ~ format!("{}: {}", path.display(), err), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/cli/src/pattern.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | / io::Error::new( [INFO] [stdout] 92 | | io::ErrorKind::Other, [INFO] [stdout] 93 | | format!("{}:{}", path.display(), err), [INFO] [stdout] 94 | | ) [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 91 ~ io::Error::other( [INFO] [stdout] 92 ~ format!("{}:{}", path.display(), err), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/cli/src/pattern.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 108 | io::Error::new(io::ErrorKind::Other, format!(":{}", err)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 108 - io::Error::new(io::ErrorKind::Other, format!(":{}", err)) [INFO] [stdout] 108 + io::Error::other(format!(":{}", err)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/cli/src/pattern.rs:151:29 [INFO] [stdout] | [INFO] [stdout] 151 | Err(err) => Err(io::Error::new( [INFO] [stdout] | _____________________________^ [INFO] [stdout] 152 | | io::ErrorKind::Other, [INFO] [stdout] 153 | | format!("{}: {}", line_number, err), [INFO] [stdout] 154 | | )), [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 151 ~ Err(err) => Err(io::Error::other( [INFO] [stdout] 152 ~ format!("{}: {}", line_number, err), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/cli/src/process.rs:76:17 [INFO] [stdout] | [INFO] [stdout] 76 | io::Error::new(io::ErrorKind::Other, cmderr) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 76 - io::Error::new(io::ErrorKind::Other, cmderr) [INFO] [stdout] 76 + io::Error::other(cmderr) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> crates/printer/src/json.rs:908:22 [INFO] [stdout] | [INFO] [stdout] 908 | const SHERLOCK: &'static [u8] = b"\ [INFO] [stdout] | -^^^^^^^----- help: consider removing `'static`: `&[u8]` [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] --> crates/printer/src/json.rs:925:24 [INFO] [stdout] | [INFO] [stdout] 925 | const BINARY: &'static [u8] = b"\ [INFO] [stdout] | -^^^^^^^----- help: consider removing `'static`: `&[u8]` [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] --> crates/printer/src/standard.rs:1753:22 [INFO] [stdout] | [INFO] [stdout] 1753 | const SHERLOCK: &'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] --> crates/printer/src/standard.rs:1763:27 [INFO] [stdout] | [INFO] [stdout] 1763 | const SHERLOCK_CRLF: &'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] --> crates/printer/src/summary.rs:799:22 [INFO] [stdout] | [INFO] [stdout] 799 | const SHERLOCK: &'static [u8] = b"\ [INFO] [stdout] | -^^^^^^^----- help: consider removing `'static`: `&[u8]` [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 `impl` can be derived [INFO] [stdout] --> crates/searcher/src/line_buffer.rs:29:1 [INFO] [stdout] | [INFO] [stdout] 29 | / impl Default for BufferAllocation { [INFO] [stdout] 30 | | fn default() -> BufferAllocation { [INFO] [stdout] 31 | | BufferAllocation::Eager [INFO] [stdout] 32 | | } [INFO] [stdout] 33 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 17 + #[derive(Default)] [INFO] [stdout] 18 | pub(crate) enum BufferAllocation { [INFO] [stdout] 19 | /// Attempt to expand the size of the buffer until either at least the next [INFO] [stdout] ... [INFO] [stdout] 22 | /// This is the default. [INFO] [stdout] 23 ~ #[default] [INFO] [stdout] 24 ~ Eager, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/searcher/src/line_buffer.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 39 | io::Error::new(io::ErrorKind::Other, msg) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 39 - io::Error::new(io::ErrorKind::Other, msg) [INFO] [stdout] 39 + io::Error::other(msg) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> crates/searcher/src/line_buffer.rs:66:1 [INFO] [stdout] | [INFO] [stdout] 66 | / impl Default for BinaryDetection { [INFO] [stdout] 67 | | fn default() -> BinaryDetection { [INFO] [stdout] 68 | | BinaryDetection::None [INFO] [stdout] 69 | | } [INFO] [stdout] 70 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 51 + #[derive(Default)] [INFO] [stdout] 52 | pub(crate) enum BinaryDetection { [INFO] [stdout] 53 | /// No binary detection is performed. Data reported by the line buffer may [INFO] [stdout] 54 | /// contain arbitrary bytes. [INFO] [stdout] 55 ~ #[default] [INFO] [stdout] 56 ~ None, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> crates/searcher/src/line_buffer.rs:76:9 [INFO] [stdout] | [INFO] [stdout] 76 | / match *self { [INFO] [stdout] 77 | | BinaryDetection::Quit(_) => true, [INFO] [stdout] 78 | | _ => false, [INFO] [stdout] 79 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 76 - match *self { [INFO] [stdout] 77 - BinaryDetection::Quit(_) => true, [INFO] [stdout] 78 - _ => false, [INFO] [stdout] 79 - } [INFO] [stdout] 76 + matches!(*self, BinaryDetection::Quit(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `bytes.get(0)` [INFO] [stdout] --> crates/searcher/src/line_buffer.rs:546:15 [INFO] [stdout] | [INFO] [stdout] 546 | while bytes.get(0) == Some(&src) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `bytes.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/ignore/src/dir.rs:215:13 [INFO] [stdout] | [INFO] [stdout] 215 | / if let Some(weak) = compiled.get(parent.as_os_str()) { [INFO] [stdout] 216 | | if let Some(prebuilt) = weak.upgrade() { [INFO] [stdout] 217 | | ig = Ignore(prebuilt); [INFO] [stdout] 218 | | continue; [INFO] [stdout] 219 | | } [INFO] [stdout] 220 | | } [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] 215 ~ if let Some(weak) = compiled.get(parent.as_os_str()) [INFO] [stdout] 216 ~ && let Some(prebuilt) = weak.upgrade() { [INFO] [stdout] 217 | ig = Ignore(prebuilt); [INFO] [stdout] 218 | continue; [INFO] [stdout] 219 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/ignore/src/dir.rs:273:17 [INFO] [stdout] | [INFO] [stdout] 273 | &dir, [INFO] [stdout] | ^^^^ help: change this to: `dir` [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] --> crates/ignore/src/dir.rs:274:17 [INFO] [stdout] | [INFO] [stdout] 274 | &dir, [INFO] [stdout] | ^^^^ help: change this to: `dir` [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] --> crates/ignore/src/dir.rs:285:17 [INFO] [stdout] | [INFO] [stdout] 285 | &dir, [INFO] [stdout] | ^^^^ help: change this to: `dir` [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] --> crates/ignore/src/dir.rs:286:17 [INFO] [stdout] | [INFO] [stdout] 286 | &dir, [INFO] [stdout] | ^^^^ help: change this to: `dir` [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] --> crates/ignore/src/dir.rs:297:17 [INFO] [stdout] | [INFO] [stdout] 297 | &dir, [INFO] [stdout] | ^^^^ help: change this to: `dir` [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] --> crates/ignore/src/dir.rs:298:17 [INFO] [stdout] | [INFO] [stdout] 298 | &dir, [INFO] [stdout] | ^^^^ help: change this to: `dir` [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] --> crates/ignore/src/dir.rs:312:25 [INFO] [stdout] | [INFO] [stdout] 312 | &dir, [INFO] [stdout] | ^^^^ help: change this to: `dir` [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 `if` statement can be collapsed [INFO] [stdout] --> crates/ignore/src/dir.rs:472:9 [INFO] [stdout] | [INFO] [stdout] 472 | / if self.0.opts.parents { [INFO] [stdout] 473 | | if let Some(abs_parent_path) = self.absolute_base() { [INFO] [stdout] ... | [INFO] [stdout] 533 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 472 ~ if self.0.opts.parents [INFO] [stdout] 473 ~ && let Some(abs_parent_path) = self.absolute_base() { [INFO] [stdout] 474 | // What we want to do here is take the absolute base path of [INFO] [stdout] ... [INFO] [stdout] 531 | } [INFO] [stdout] 532 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> crates/ignore/src/dir.rs:538:37 [INFO] [stdout] | [INFO] [stdout] 538 | m_explicit = gi.matched(&path, is_dir).map(IgnoreMatch::gitignore); [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_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> crates/ignore/src/dir.rs:543:26 [INFO] [stdout] | [INFO] [stdout] 543 | .matched(&path, is_dir) [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_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/ignore/src/dir.rs:897:9 [INFO] [stdout] | [INFO] [stdout] 897 | if !git_type.map_or(false, |ft| ft.is_file()) { [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] 897 - if !git_type.map_or(false, |ft| ft.is_file()) { [INFO] [stdout] 897 + if !git_type.is_some_and(|ft| ft.is_file()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.as_ref().map(|p| &**p)` on an `Option` value [INFO] [stdout] --> crates/ignore/src/gitignore.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | self.from.as_ref().map(|p| &**p) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using as_deref: `self.from.as_deref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_as_ref_deref [INFO] [stdout] = note: `#[warn(clippy::option_as_ref_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/ignore/src/gitignore.rs:155:9 [INFO] [stdout] | [INFO] [stdout] 155 | &*self.root [INFO] [stdout] | ^^^^^^^^^^^ help: try: `&self.root` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/ignore/src/gitignore.rs:259:53 [INFO] [stdout] | [INFO] [stdout] 259 | self.set.matches_candidate_into(&candidate, &mut *matches); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `&mut matches` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/ignore/src/gitignore.rs:294:9 [INFO] [stdout] | [INFO] [stdout] 294 | / if self.root != Path::new(".") && !is_file_name(path) { [INFO] [stdout] 295 | | if let Some(p) = strip_prefix(&self.root, path) { [INFO] [stdout] 296 | | path = p; [INFO] [stdout] ... | [INFO] [stdout] 302 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 294 ~ if self.root != Path::new(".") && !is_file_name(path) [INFO] [stdout] 295 ~ && let Some(p) = strip_prefix(&self.root, path) { [INFO] [stdout] 296 | path = p; [INFO] [stdout] ... [INFO] [stdout] 300 | } [INFO] [stdout] 301 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> crates/ignore/src/gitignore.rs:351:46 [INFO] [stdout] | [INFO] [stdout] 351 | matches: Some(Arc::new(Pool::new(|| vec![]))), [INFO] [stdout] | ^^^^^^^^^ help: replace the closure with `Vec::new`: `std::vec::Vec::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/ignore/src/gitignore.rs:416:71 [INFO] [stdout] | [INFO] [stdout] 416 | if let Err(err) = self.add_line(Some(path.to_path_buf()), &line) { [INFO] [stdout] | ^^^^^ help: change this to: `line` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> crates/ignore/src/gitignore.rs:575:5 [INFO] [stdout] | [INFO] [stdout] 575 | / match gitconfig_home_contents().and_then(|x| parse_excludes_file(&x)) { [INFO] [stdout] 576 | | Some(path) => return Some(path), [INFO] [stdout] 577 | | None => {} [INFO] [stdout] 578 | | } [INFO] [stdout] | |_____^ help: try: `if let Some(path) = gitconfig_home_contents().and_then(|x| parse_excludes_file(&x)) { return Some(path) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> crates/ignore/src/gitignore.rs:579:5 [INFO] [stdout] | [INFO] [stdout] 579 | / match gitconfig_xdg_contents().and_then(|x| parse_excludes_file(&x)) { [INFO] [stdout] 580 | | Some(path) => return Some(path), [INFO] [stdout] 581 | | None => {} [INFO] [stdout] 582 | | } [INFO] [stdout] | |_____^ help: try: `if let Some(path) = gitconfig_xdg_contents().and_then(|x| parse_excludes_file(&x)) { return Some(path) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> crates/ignore/src/gitignore.rs:589:16 [INFO] [stdout] | [INFO] [stdout] 589 | let home = match home_dir() { [INFO] [stdout] | ________________^ [INFO] [stdout] 590 | | None => return None, [INFO] [stdout] 591 | | Some(home) => home, [INFO] [stdout] 592 | | }; [INFO] [stdout] | |_____^ help: try instead: `home_dir()?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `name.as_bytes().get(0)` [INFO] [stdout] --> crates/ignore/src/pathutil.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | name.as_bytes().get(0) == Some(&b'.') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `name.as_bytes().first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/ignore/src/pathutil.rs:74:14 [INFO] [stdout] | [INFO] [stdout] 74 | Some(&Path::new(OsStr::from_bytes(&path[prefix.len()..]))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `Path::new(OsStr::from_bytes(&path[prefix.len()..]))` [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: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> crates/ignore/src/pathutil.rs:113:25 [INFO] [stdout] | [INFO] [stdout] 113 | pub(crate) fn file_name<'a, P: AsRef + ?Sized>( [INFO] [stdout] | ^^ [INFO] [stdout] 114 | path: &'a P, [INFO] [stdout] | ^^ [INFO] [stdout] 115 | ) -> Option<&'a OsStr> { [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] 113 ~ pub(crate) fn file_name + ?Sized>( [INFO] [stdout] 114 ~ path: &P, [INFO] [stdout] 115 ~ ) -> Option<&OsStr> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> crates/ignore/src/pathutil.rs:120:24 [INFO] [stdout] | [INFO] [stdout] 120 | if path.is_empty() { [INFO] [stdout] | ________________________^ [INFO] [stdout] 121 | | return None; [INFO] [stdout] 122 | | } else if path.len() == 1 && path[0] == b'.' { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> crates/ignore/src/pathutil.rs:122:50 [INFO] [stdout] | [INFO] [stdout] 122 | } else if path.len() == 1 && path[0] == b'.' { [INFO] [stdout] | __________________________________________________^ [INFO] [stdout] 123 | | return None; [INFO] [stdout] 124 | | } else if path.last() == Some(&b'.') { [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> crates/ignore/src/pathutil.rs:122:50 [INFO] [stdout] | [INFO] [stdout] 122 | } else if path.len() == 1 && path[0] == b'.' { [INFO] [stdout] | __________________________________________________^ [INFO] [stdout] 123 | | return None; [INFO] [stdout] 124 | | } else if path.last() == Some(&b'.') { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> crates/ignore/src/pathutil.rs:124:42 [INFO] [stdout] | [INFO] [stdout] 124 | } else if path.last() == Some(&b'.') { [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 125 | | return None; [INFO] [stdout] 126 | | } else if path.len() >= 2 && &path[path.len() - 2..] == &b".."[..] { [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> crates/ignore/src/pathutil.rs:124:42 [INFO] [stdout] | [INFO] [stdout] 124 | } else if path.last() == Some(&b'.') { [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 125 | | return None; [INFO] [stdout] 126 | | } else if path.len() >= 2 && &path[path.len() - 2..] == &b".."[..] { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> crates/ignore/src/pathutil.rs:126:72 [INFO] [stdout] | [INFO] [stdout] 126 | } else if path.len() >= 2 && &path[path.len() - 2..] == &b".."[..] { [INFO] [stdout] | ________________________________________________________________________^ [INFO] [stdout] 127 | | return None; [INFO] [stdout] 128 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> crates/ignore/src/pathutil.rs:126:34 [INFO] [stdout] | [INFO] [stdout] 126 | } else if path.len() >= 2 && &path[path.len() - 2..] == &b".."[..] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 126 - } else if path.len() >= 2 && &path[path.len() - 2..] == &b".."[..] { [INFO] [stdout] 126 + } else if path.len() >= 2 && path[path.len() - 2..] == b".."[..] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> crates/ignore/src/types.rs:234:41 [INFO] [stdout] | [INFO] [stdout] 234 | matches: Arc::new(Pool::new(|| vec![])), [INFO] [stdout] | ^^^^^^^^^ help: replace the closure with `Vec::new`: `std::vec::Vec::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/ignore/src/types.rs:283:37 [INFO] [stdout] | [INFO] [stdout] 283 | self.set.matches_into(name, &mut *matches); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `&mut matches` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `TypesBuilder` [INFO] [stdout] --> crates/ignore/src/types.rs:316:5 [INFO] [stdout] | [INFO] [stdout] 316 | / pub fn new() -> TypesBuilder { [INFO] [stdout] 317 | | TypesBuilder { types: HashMap::new(), selections: vec![] } [INFO] [stdout] 318 | | } [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] 310 + impl Default for TypesBuilder { [INFO] [stdout] 311 + fn default() -> Self { [INFO] [stdout] 312 + Self::new() [INFO] [stdout] 313 + } [INFO] [stdout] 314 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> crates/ignore/src/types.rs:360:41 [INFO] [stdout] | [INFO] [stdout] 360 | matches: Arc::new(Pool::new(|| vec![])), [INFO] [stdout] | ^^^^^^^^^ help: replace the closure with `Vec::new`: `std::vec::Vec::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> crates/ignore/src/types.rs:436:9 [INFO] [stdout] | [INFO] [stdout] 436 | /// given name with the given glob. [INFO] [stdout] | ^^^^ help: try using ` ` (3 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] = note: `#[warn(clippy::doc_overindented_list_items)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> crates/ignore/src/types.rs:438:9 [INFO] [stdout] | [INFO] [stdout] 438 | /// This defines an 'include' definition that associates the given name [INFO] [stdout] | ^^^^ help: try using ` ` (3 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> crates/ignore/src/types.rs:439:9 [INFO] [stdout] | [INFO] [stdout] 439 | /// with the definitions of the given existing types. [INFO] [stdout] | ^^^^ help: try using ` ` (3 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/types.rs:440:9 [INFO] [stdout] | [INFO] [stdout] 440 | /// Names may not include any characters that are not [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 440 | /// Names may not include any characters that are not [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/types.rs:441:9 [INFO] [stdout] | [INFO] [stdout] 441 | /// Unicode letters or numbers. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 441 | /// Unicode letters or numbers. [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> crates/ignore/src/walk.rs:165:9 [INFO] [stdout] | [INFO] [stdout] 165 | / match *self { [INFO] [stdout] 166 | | DirEntryInner::Stdin => true, [INFO] [stdout] 167 | | _ => false, [INFO] [stdout] 168 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 165 - match *self { [INFO] [stdout] 166 - DirEntryInner::Stdin => true, [INFO] [stdout] 167 - _ => false, [INFO] [stdout] 168 - } [INFO] [stdout] 165 + matches!(*self, DirEntryInner::Stdin) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/ignore/src/walk.rs:175:37 [INFO] [stdout] | [INFO] [stdout] 175 | let err = Error::Io(io::Error::new( [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 176 | | io::ErrorKind::Other, [INFO] [stdout] 177 | | " has no metadata", [INFO] [stdout] 178 | | )); [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 175 ~ let err = Error::Io(io::Error::other( [INFO] [stdout] 176 ~ " has no metadata", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::io::Error` [INFO] [stdout] --> crates/ignore/src/walk.rs:302:34 [INFO] [stdout] | [INFO] [stdout] 302 | .map_err(|err| Error::Io(io::Error::from(err)).with_path(&self.path)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider removing `io::Error::from()`: `err` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::io::Error` [INFO] [stdout] --> crates/ignore/src/walk.rs:327:33 [INFO] [stdout] | [INFO] [stdout] 327 | let err = Error::Io(io::Error::from(err)).with_path(ent.path()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider removing `io::Error::from()`: `err` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:456:5 [INFO] [stdout] | [INFO] [stdout] 456 | /// then matching stops. The path is then only skipped if the glob that matched [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 456 | /// then matching stops. The path is then only skipped if the glob that matched [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:457:5 [INFO] [stdout] | [INFO] [stdout] 457 | /// the path is an ignore glob. (An override glob is a whitelist glob unless it [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 457 | /// the path is an ignore glob. (An override glob is a whitelist glob unless it [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:458:5 [INFO] [stdout] | [INFO] [stdout] 458 | /// starts with a `!`, in which case it is an ignore glob.) [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 458 | /// starts with a `!`, in which case it is an ignore glob.) [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:460:5 [INFO] [stdout] | [INFO] [stdout] 460 | /// git ignore files (`.gitignore`, `.git/info/exclude` and the configured [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 460 | /// git ignore files (`.gitignore`, `.git/info/exclude` and the configured [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:461:5 [INFO] [stdout] | [INFO] [stdout] 461 | /// global gitignore file), plain `.ignore` files, which have the same format [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 461 | /// global gitignore file), plain `.ignore` files, which have the same format [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:462:5 [INFO] [stdout] | [INFO] [stdout] 462 | /// as gitignore files, or explicitly added ignore files. The precedence order [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 462 | /// as gitignore files, or explicitly added ignore files. The precedence order [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:463:5 [INFO] [stdout] | [INFO] [stdout] 463 | /// is: `.ignore`, `.gitignore`, `.git/info/exclude`, global gitignore and [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 463 | /// is: `.ignore`, `.gitignore`, `.git/info/exclude`, global gitignore and [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:464:5 [INFO] [stdout] | [INFO] [stdout] 464 | /// finally explicitly added ignore files. Note that precedence between [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 464 | /// finally explicitly added ignore files. Note that precedence between [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:465:5 [INFO] [stdout] | [INFO] [stdout] 465 | /// different types of ignore files is not impacted by the directory hierarchy; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 465 | /// different types of ignore files is not impacted by the directory hierarchy; [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:466:5 [INFO] [stdout] | [INFO] [stdout] 466 | /// any `.ignore` file overrides all `.gitignore` files. Within each precedence [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 466 | /// any `.ignore` file overrides all `.gitignore` files. Within each precedence [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:467:5 [INFO] [stdout] | [INFO] [stdout] 467 | /// level, more nested ignore files have a higher precedence than less nested [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 467 | /// level, more nested ignore files have a higher precedence than less nested [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:468:5 [INFO] [stdout] | [INFO] [stdout] 468 | /// ignore files. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 468 | /// ignore files. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:470:5 [INFO] [stdout] | [INFO] [stdout] 470 | /// is stopped and the path is skipped. If it yields a whitelist match, then [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 470 | /// is stopped and the path is skipped. If it yields a whitelist match, then [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:471:5 [INFO] [stdout] | [INFO] [stdout] 471 | /// matching continues. A whitelist match can be overridden by a later matcher. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 471 | /// matching continues. A whitelist match can be overridden by a later matcher. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:473:5 [INFO] [stdout] | [INFO] [stdout] 473 | /// the path. As above, if it yields an ignore match, then all matching is [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 473 | /// the path. As above, if it yields an ignore match, then all matching is [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:474:5 [INFO] [stdout] | [INFO] [stdout] 474 | /// stopped and the path is skipped. If it yields a whitelist match, then [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 474 | /// stopped and the path is skipped. If it yields a whitelist match, then [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:475:5 [INFO] [stdout] | [INFO] [stdout] 475 | /// matching continues. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 475 | /// matching continues. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:477:5 [INFO] [stdout] | [INFO] [stdout] 477 | /// path is skipped. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 477 | /// path is skipped. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:479:5 [INFO] [stdout] | [INFO] [stdout] 479 | /// against the max filesize limit. If it exceeds the limit, it is skipped. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 479 | /// against the max filesize limit. If it exceeds the limit, it is skipped. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:481:5 [INFO] [stdout] | [INFO] [stdout] 481 | /// iterator. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 481 | /// iterator. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> crates/ignore/src/walk.rs:511:12 [INFO] [stdout] | [INFO] [stdout] 511 | ByName(Arc Ordering + Send + Sync + 'static>), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> crates/ignore/src/walk.rs:512:12 [INFO] [stdout] | [INFO] [stdout] 512 | ByPath(Arc Ordering + Send + Sync + 'static>), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.max_filesize` after checking its variant with `is_some` [INFO] [stdout] --> crates/ignore/src/walk.rs:1080:17 [INFO] [stdout] | [INFO] [stdout] 1078 | if self.max_filesize.is_some() && !ent.is_dir() { [INFO] [stdout] | --------------------------- the check is happening here [INFO] [stdout] 1079 | return Ok(skip_filesize( [INFO] [stdout] 1080 | self.max_filesize.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/ignore/src/walk.rs:1073:9 [INFO] [stdout] | [INFO] [stdout] 1073 | / if let Some(ref stdout) = self.skip { [INFO] [stdout] 1074 | | if path_equals(ent, stdout)? { [INFO] [stdout] 1075 | | return Ok(true); [INFO] [stdout] 1076 | | } [INFO] [stdout] 1077 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1073 ~ if let Some(ref stdout) = self.skip [INFO] [stdout] 1074 ~ && path_equals(ent, stdout)? { [INFO] [stdout] 1075 | return Ok(true); [INFO] [stdout] 1076 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/ignore/src/walk.rs:1085:9 [INFO] [stdout] | [INFO] [stdout] 1085 | / if let Some(Filter(filter)) = &self.filter { [INFO] [stdout] 1086 | | if !filter(ent) { [INFO] [stdout] 1087 | | return Ok(true); [INFO] [stdout] 1088 | | } [INFO] [stdout] 1089 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1085 ~ if let Some(Filter(filter)) = &self.filter [INFO] [stdout] 1086 ~ && !filter(ent) { [INFO] [stdout] 1087 | return Ok(true); [INFO] [stdout] 1088 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> crates/ignore/src/walk.rs:1261:6 [INFO] [stdout] | [INFO] [stdout] 1261 | impl<'a, 's, P: ParallelVisitorBuilder<'s>> ParallelVisitorBuilder<'s> [INFO] [stdout] | ^^ [INFO] [stdout] 1262 | for &'a mut P [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] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 1261 ~ impl<'s, P: ParallelVisitorBuilder<'s>> ParallelVisitorBuilder<'s> [INFO] [stdout] 1262 ~ for &mut P [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/ignore/src/walk.rs:1485:9 [INFO] [stdout] | [INFO] [stdout] 1485 | self.dent.file_type().map_or(false, |ft| ft.is_symlink()) [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] 1485 - self.dent.file_type().map_or(false, |ft| ft.is_symlink()) [INFO] [stdout] 1485 + self.dent.file_type().is_some_and(|ft| ft.is_symlink()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/ignore/src/walk.rs:1712:12 [INFO] [stdout] | [INFO] [stdout] 1712 | if self.max_depth.map_or(false, |max| depth >= max) { [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] 1712 - if self.max_depth.map_or(false, |max| depth >= max) { [INFO] [stdout] 1712 + if self.max_depth.is_some_and(|max| depth >= max) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.max_filesize` after checking its variant with `is_some` [INFO] [stdout] --> crates/ignore/src/walk.rs:1795:21 [INFO] [stdout] | [INFO] [stdout] 1793 | if self.max_filesize.is_some() && !dent.is_dir() { [INFO] [stdout] | --------------------------- the check is happening here [INFO] [stdout] 1794 | skip_filesize( [INFO] [stdout] 1795 | self.max_filesize.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/ignore/src/walk.rs:1763:26 [INFO] [stdout] | [INFO] [stdout] 1763 | let is_symlink = dent.file_type().map_or(false, |ft| ft.is_symlink()); [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] 1763 - let is_symlink = dent.file_type().map_or(false, |ft| ft.is_symlink()); [INFO] [stdout] 1763 + let is_symlink = dent.file_type().is_some_and(|ft| ft.is_symlink()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/ignore/src/walk.rs:1772:13 [INFO] [stdout] | [INFO] [stdout] 1772 | / if dent.is_dir() { [INFO] [stdout] 1773 | | if let Err(err) = check_symlink_loop(ig, dent.path(), depth) { [INFO] [stdout] 1774 | | return self.visitor.visit(Err(err)); [INFO] [stdout] 1775 | | } [INFO] [stdout] 1776 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1772 ~ if dent.is_dir() [INFO] [stdout] 1773 ~ && let Err(err) = check_symlink_loop(ig, dent.path(), depth) { [INFO] [stdout] 1774 | return self.visitor.visit(Err(err)); [INFO] [stdout] 1775 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> crates/ignore/src/walk.rs:1933:20 [INFO] [stdout] | [INFO] [stdout] 1933 | let filesize = match *ent { [INFO] [stdout] | ____________________^ [INFO] [stdout] 1934 | | Some(ref md) => Some(md.len()), [INFO] [stdout] 1935 | | None => None, [INFO] [stdout] 1936 | | }; [INFO] [stdout] | |_____^ help: try: `(*ent).as_ref().map(|md| md.len())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/ignore/src/walk.rs:2024:5 [INFO] [stdout] | [INFO] [stdout] 2024 | dent.path().metadata().ok().map_or(false, |md| md.file_type().is_dir()) [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] 2024 - dent.path().metadata().ok().map_or(false, |md| md.file_type().is_dir()) [INFO] [stdout] 2024 + dent.path().metadata().ok().is_some_and(|md| md.file_type().is_dir()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/searcher/src/searcher/core.rs:111:31 [INFO] [stdout] | [INFO] [stdout] 111 | self.sink.binary_data(&self.searcher, binary_byte_offset) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.searcher` [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: unneeded `return` statement [INFO] [stdout] --> crates/searcher/src/searcher/core.rs:149:25 [INFO] [stdout] | [INFO] [stdout] 149 | Err(err) => return Err(S::Error::error_message(err)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 149 - Err(err) => return Err(S::Error::error_message(err)), [INFO] [stdout] 149 + Err(err) => Err(S::Error::error_message(err)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/searcher/src/searcher/core.rs:150:25 [INFO] [stdout] | [INFO] [stdout] 150 | Ok(None) => return Ok(None), [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 150 - Ok(None) => return Ok(None), [INFO] [stdout] 150 + Ok(None) => Ok(None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/searcher/src/searcher/core.rs:156:25 [INFO] [stdout] | [INFO] [stdout] 156 | self.sink.begin(&self.searcher) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.searcher` [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] --> crates/searcher/src/searcher/core.rs:165:13 [INFO] [stdout] | [INFO] [stdout] 165 | &self.searcher, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.searcher` [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: returning the result of a `let` binding from a block [INFO] [stdout] --> crates/searcher/src/searcher/core.rs:205:13 [INFO] [stdout] | [INFO] [stdout] 203 | / let consumed = [INFO] [stdout] 204 | | std::cmp::max(context_start, self.last_line_visited); [INFO] [stdout] | |_____________________________________________________________________- unnecessary `let` binding [INFO] [stdout] 205 | consumed [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 203 ~ [INFO] [stdout] 204 ~ std::cmp::max(context_start, self.last_line_visited) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/searcher/src/searcher/core.rs:373:20 [INFO] [stdout] | [INFO] [stdout] 373 | } else if self.config.passthru { [INFO] [stdout] | ____________________^ [INFO] [stdout] 374 | | if !self.sink_other_context(buf, &line)? { [INFO] [stdout] 375 | | return Ok(false); [INFO] [stdout] 376 | | } [INFO] [stdout] 377 | | } [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] 373 ~ } else if self.config.passthru [INFO] [stdout] 374 ~ && !self.sink_other_context(buf, &line)? { [INFO] [stdout] 375 | return Ok(false); [INFO] [stdout] 376 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/searcher/src/searcher/core.rs:537:13 [INFO] [stdout] | [INFO] [stdout] 537 | &self.searcher, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.searcher` [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] --> crates/searcher/src/searcher/core.rs:567:13 [INFO] [stdout] | [INFO] [stdout] 567 | &self.searcher, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.searcher` [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] --> crates/searcher/src/searcher/core.rs:598:13 [INFO] [stdout] | [INFO] [stdout] 598 | &self.searcher, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.searcher` [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] --> crates/searcher/src/searcher/core.rs:628:13 [INFO] [stdout] | [INFO] [stdout] 628 | &self.searcher, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.searcher` [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] --> crates/searcher/src/searcher/core.rs:657:37 [INFO] [stdout] | [INFO] [stdout] 657 | self.sink.context_break(&self.searcher) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.searcher` [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 `map_or` can be simplified [INFO] [stdout] --> crates/searcher/src/searcher/core.rs:711:9 [INFO] [stdout] | [INFO] [stdout] 711 | self.config.max_matches.map_or(false, |limit| self.count() >= limit) [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] 711 - self.config.max_matches.map_or(false, |limit| self.count() >= limit) [INFO] [stdout] 711 + self.config.max_matches.is_some_and(|limit| self.count() >= limit) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/searcher/src/searcher/glue.rs:69:9 [INFO] [stdout] | [INFO] [stdout] 69 | / if !already_binary { [INFO] [stdout] 70 | | if let Some(offset) = self.rdr.binary_byte_offset() { [INFO] [stdout] 71 | | if !self.core.binary_data(offset)? { [INFO] [stdout] 72 | | return Ok(false); [INFO] [stdout] ... | [INFO] [stdout] 75 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 69 ~ if !already_binary [INFO] [stdout] 70 ~ && let Some(offset) = self.rdr.binary_byte_offset() { [INFO] [stdout] 71 | if !self.core.binary_data(offset)? { [INFO] [stdout] 72 | return Ok(false); [INFO] [stdout] 73 | } [INFO] [stdout] 74 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/searcher/src/searcher/glue.rs:70:13 [INFO] [stdout] | [INFO] [stdout] 70 | / if let Some(offset) = self.rdr.binary_byte_offset() { [INFO] [stdout] 71 | | if !self.core.binary_data(offset)? { [INFO] [stdout] 72 | | return Ok(false); [INFO] [stdout] 73 | | } [INFO] [stdout] 74 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 70 ~ if let Some(offset) = self.rdr.binary_byte_offset() [INFO] [stdout] 71 ~ && !self.core.binary_data(offset)? { [INFO] [stdout] 72 | return Ok(false); [INFO] [stdout] 73 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Searcher` [INFO] [stdout] --> crates/searcher/src/searcher/mod.rs:632:5 [INFO] [stdout] | [INFO] [stdout] 632 | / pub fn new() -> Searcher { [INFO] [stdout] 633 | | SearcherBuilder::new().build() [INFO] [stdout] 634 | | } [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] 627 + impl Default for Searcher { [INFO] [stdout] 628 + fn default() -> Self { [INFO] [stdout] 629 + Self::new() [INFO] [stdout] 630 + } [INFO] [stdout] 631 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/searcher/src/searcher/mod.rs:706:17 [INFO] [stdout] | [INFO] [stdout] 706 | &*self.multi_line_buffer.borrow(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&self.multi_line_buffer.borrow()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/searcher/src/searcher/mod.rs:755:17 [INFO] [stdout] | [INFO] [stdout] 755 | &*self.multi_line_buffer.borrow(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&self.multi_line_buffer.borrow()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/searcher/src/searcher/mod.rs:761:54 [INFO] [stdout] | [INFO] [stdout] 761 | let rdr = LineBufferReader::new(decoder, &mut *line_buffer); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `&mut line_buffer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/searcher/src/searcher/mod.rs:900:9 [INFO] [stdout] | [INFO] [stdout] 900 | / if let Some(line_term) = matcher.line_terminator() { [INFO] [stdout] 901 | | if line_term == self.line_terminator() { [INFO] [stdout] 902 | | return false; [INFO] [stdout] 903 | | } [INFO] [stdout] 904 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 900 ~ if let Some(line_term) = matcher.line_terminator() [INFO] [stdout] 901 ~ && line_term == self.line_terminator() { [INFO] [stdout] 902 | return false; [INFO] [stdout] 903 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/searcher/src/searcher/mod.rs:965:35 [INFO] [stdout] | [INFO] [stdout] 965 | read_from.read_to_end(&mut *buf).map_err(S::Error::error_io)?; [INFO] [stdout] | ^^^^^^^^^ help: try: `&mut buf` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/searcher/src/searcher/mod.rs:990:34 [INFO] [stdout] | [INFO] [stdout] 990 | .read_to_end(&mut *buf) [INFO] [stdout] | ^^^^^^^^^ help: try: `&mut buf` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/searcher/src/sink.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | io::Error::new(io::ErrorKind::Other, message.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 44 - io::Error::new(io::ErrorKind::Other, message.to_string()) [INFO] [stdout] 44 + io::Error::other(message.to_string()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> crates/searcher/src/sink.rs:225:6 [INFO] [stdout] | [INFO] [stdout] 225 | impl<'a, S: Sink> Sink for &'a mut S { [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] 225 - impl<'a, S: Sink> Sink for &'a mut S { [INFO] [stdout] 225 + impl Sink for &mut S { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/searcher/src/sink.rs:566:35 [INFO] [stdout] | [INFO] [stdout] 566 | (self.0)(line_number, &matched) [INFO] [stdout] | ^^^^^^^^ help: change this to: `matched` [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: unnecessary map of the identity function [INFO] [stdout] --> crates/searcher/src/testutil.rs:98:62 [INFO] [stdout] | [INFO] [stdout] 98 | .find_byte(self.line_term.unwrap().as_byte()) [INFO] [stdout] | ______________________________________________________________^ [INFO] [stdout] 99 | | .map(|i| i) [INFO] [stdout] | |___________________________^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `writeln!` [INFO] [stdout] --> crates/searcher/src/testutil.rs:183:9 [INFO] [stdout] | [INFO] [stdout] 183 | writeln!(self.0, "")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#writeln_empty_string [INFO] [stdout] = note: `#[warn(clippy::writeln_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> crates/ignore/tests/gitignore_matched_path_or_any_parents_tests.rs:5:21 [INFO] [stdout] | [INFO] [stdout] 5 | const IGNORE_FILE: &'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: using `clone` on type `Color` which implements the `Copy` trait [INFO] [stdout] --> crates/printer/src/color.rs:276:35 [INFO] [stdout] | [INFO] [stdout] 276 | cspec.set_fg(Some(color.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*color` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Color` which implements the `Copy` trait [INFO] [stdout] --> crates/printer/src/color.rs:279:35 [INFO] [stdout] | [INFO] [stdout] 279 | cspec.set_bg(Some(color.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*color` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> crates/ignore/tests/gitignore_matched_path_or_any_parents_tests.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | assert!(false); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] = note: `#[warn(clippy::assertions_on_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> crates/printer/src/hyperlink/mod.rs:495:43 [INFO] [stdout] | [INFO] [stdout] 495 | let is_valid_scheme_char = |byte| match byte { [INFO] [stdout] | ___________________________________________^ [INFO] [stdout] 496 | | b'0'..=b'9' | b'A'..=b'Z' | b'a'..=b'z' | b'+' | b'-' | b'.' => { [INFO] [stdout] 497 | | true [INFO] [stdout] ... | [INFO] [stdout] 500 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 495 - let is_valid_scheme_char = |byte| match byte { [INFO] [stdout] 496 - b'0'..=b'9' | b'A'..=b'Z' | b'a'..=b'z' | b'+' | b'-' | b'.' => { [INFO] [stdout] 497 - true [INFO] [stdout] 498 - } [INFO] [stdout] 499 - _ => false, [INFO] [stdout] 500 - }; [INFO] [stdout] 495 + let is_valid_scheme_char = |byte| matches!(byte, b'0'..=b'9' | b'A'..=b'Z' | b'a'..=b'z' | b'+' | b'-' | b'.'); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `iter().cloned().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable [INFO] [stdout] --> crates/printer/src/hyperlink/mod.rs:947:30 [INFO] [stdout] | [INFO] [stdout] 947 | HYPERLINK_PATTERN_ALIASES.iter().cloned().collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_cloned_collect [INFO] [stdout] = note: `#[warn(clippy::iter_cloned_collect)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `JSONBuilder` [INFO] [stdout] --> crates/printer/src/json.rs:60:5 [INFO] [stdout] | [INFO] [stdout] 60 | / pub fn new() -> JSONBuilder { [INFO] [stdout] 61 | | JSONBuilder { config: Config::default() } [INFO] [stdout] 62 | | } [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] 58 + impl Default for JSONBuilder { [INFO] [stdout] 59 + fn default() -> Self { [INFO] [stdout] 60 + Self::new() [INFO] [stdout] 61 + } [INFO] [stdout] 62 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/printer/src/json.rs:588:5 [INFO] [stdout] | [INFO] [stdout] 588 | /// no file path is given, then this is `'static`. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 588 | /// no file path is given, then this is `'static`. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/printer/src/json.rs:590:5 [INFO] [stdout] | [INFO] [stdout] 590 | /// borrows. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 590 | /// borrows. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/printer/src/json.rs:592:5 [INFO] [stdout] | [INFO] [stdout] 592 | /// `grep_searcher::Searcher` that is reporting results to this sink. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 592 | /// `grep_searcher::Searcher` that is reporting results to this sink. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/printer/src/json.rs:594:5 [INFO] [stdout] | [INFO] [stdout] 594 | /// output to. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 594 | /// output to. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/printer/src/json.rs:695:66 [INFO] [stdout] | [INFO] [stdout] 695 | (*self.json.config.replacement).as_ref().map(|r| &*r).unwrap(); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 695 - (*self.json.config.replacement).as_ref().map(|r| &*r).unwrap(); [INFO] [stdout] 695 + (*self.json.config.replacement).as_ref().map(|r| r).unwrap(); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 695 | (*self.json.config.replacement).as_ref().map(|r| &**r).unwrap(); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/printer/src/json.rs:790:9 [INFO] [stdout] | [INFO] [stdout] 790 | / if searcher.binary_detection().quit_byte().is_some() { [INFO] [stdout] 791 | | if let Some(ref path) = self.path { [INFO] [stdout] 792 | | log::debug!( [INFO] [stdout] 793 | | "ignoring {path}: found binary data at \ [INFO] [stdout] ... | [INFO] [stdout] 798 | | } [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] 790 ~ if searcher.binary_detection().quit_byte().is_some() [INFO] [stdout] 791 ~ && let Some(ref path) = self.path { [INFO] [stdout] 792 | log::debug!( [INFO] [stdout] ... [INFO] [stdout] 796 | ); [INFO] [stdout] 797 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> crates/printer/src/json.rs:791:25 [INFO] [stdout] | [INFO] [stdout] 791 | if let Some(ref path) = self.path { [INFO] [stdout] | ^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 791 - if let Some(ref path) = self.path { [INFO] [stdout] 791 + if let Some(path) = self.path { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> crates/ignore/tests/gitignore_skip_bom.rs:3:21 [INFO] [stdout] | [INFO] [stdout] 3 | const IGNORE_FILE: &'static str = "tests/gitignore_skip_bom.gitignore"; [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: this loop could be written as a `for` loop [INFO] [stdout] --> crates/printer/src/jsont.rs:237:5 [INFO] [stdout] | [INFO] [stdout] 237 | while let Some(chunk) = it.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for chunk in it.by_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> crates/printer/src/jsont.rs:244:22 [INFO] [stdout] | [INFO] [stdout] 244 | let index4 = (group24 >> 0) & 0b111_111; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider reducing it to: `group24` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> crates/printer/src/jsont.rs:250:5 [INFO] [stdout] | [INFO] [stdout] 250 | / match it.remainder() { [INFO] [stdout] 251 | | &[] => {} [INFO] [stdout] 252 | | &[byte0] => { [INFO] [stdout] 253 | | let group8 = usize::from(byte0); [INFO] [stdout] ... | [INFO] [stdout] 271 | | _ => unreachable!("remainder must have length < 3"), [INFO] [stdout] 272 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 250 ~ match *it.remainder() { [INFO] [stdout] 251 ~ [] => {} [INFO] [stdout] 252 ~ [byte0] => { [INFO] [stdout] 253 | let group8 = usize::from(byte0); [INFO] [stdout] ... [INFO] [stdout] 260 | } [INFO] [stdout] 261 ~ [byte0, byte1] => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PathPrinterBuilder` [INFO] [stdout] --> crates/printer/src/path.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 39 | / pub fn new() -> PathPrinterBuilder { [INFO] [stdout] 40 | | PathPrinterBuilder { config: Config::default() } [INFO] [stdout] 41 | | } [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 37 + impl Default for PathPrinterBuilder { [INFO] [stdout] 38 + fn default() -> Self { [INFO] [stdout] 39 + Self::new() [INFO] [stdout] 40 + } [INFO] [stdout] 41 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/printer/src/path.rs:138:5 [INFO] [stdout] | [INFO] [stdout] 138 | /// with the other printers in this crate. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 138 | /// with the other printers in this crate. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/printer/src/path.rs:140:5 [INFO] [stdout] | [INFO] [stdout] 140 | /// with the other printers in this crate. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 140 | /// with the other printers in this crate. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `as_ref` does nothing [INFO] [stdout] --> crates/printer/src/path.rs:151:38 [INFO] [stdout] | [INFO] [stdout] 151 | let ppath = PrinterPath::new(path.as_ref()) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] = note: `#[warn(clippy::useless_asref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `StandardBuilder` [INFO] [stdout] --> crates/printer/src/standard.rs:105:5 [INFO] [stdout] | [INFO] [stdout] 105 | / pub fn new() -> StandardBuilder { [INFO] [stdout] 106 | | StandardBuilder { config: Config::default() } [INFO] [stdout] 107 | | } [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 103 + impl Default for StandardBuilder { [INFO] [stdout] 104 + fn default() -> Self { [INFO] [stdout] 105 + Self::new() [INFO] [stdout] 106 + } [INFO] [stdout] 107 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/printer/src/standard.rs:631:5 [INFO] [stdout] | [INFO] [stdout] 631 | /// no file path is given, then this is `'static`. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 631 | /// no file path is given, then this is `'static`. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/printer/src/standard.rs:633:5 [INFO] [stdout] | [INFO] [stdout] 633 | /// borrows. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 633 | /// borrows. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/printer/src/standard.rs:635:5 [INFO] [stdout] | [INFO] [stdout] 635 | /// `grep_searcher::Searcher` that is reporting results to this sink. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 635 | /// `grep_searcher::Searcher` that is reporting results to this sink. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/printer/src/standard.rs:637:5 [INFO] [stdout] | [INFO] [stdout] 637 | /// output to. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 637 | /// output to. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/printer/src/standard.rs:784:9 [INFO] [stdout] | [INFO] [stdout] 784 | / if searcher.binary_detection().convert_byte().is_some() { [INFO] [stdout] 785 | | if self.binary_byte_offset.is_some() { [INFO] [stdout] 786 | | return Ok(false); [INFO] [stdout] 787 | | } [INFO] [stdout] 788 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 784 ~ if searcher.binary_detection().convert_byte().is_some() [INFO] [stdout] 785 ~ && self.binary_byte_offset.is_some() { [INFO] [stdout] 786 | return Ok(false); [INFO] [stdout] 787 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/printer/src/standard.rs:805:9 [INFO] [stdout] | [INFO] [stdout] 805 | / if searcher.binary_detection().convert_byte().is_some() { [INFO] [stdout] 806 | | if self.binary_byte_offset.is_some() { [INFO] [stdout] 807 | | return Ok(false); [INFO] [stdout] 808 | | } [INFO] [stdout] 809 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 805 ~ if searcher.binary_detection().convert_byte().is_some() [INFO] [stdout] 806 ~ && self.binary_byte_offset.is_some() { [INFO] [stdout] 807 | return Ok(false); [INFO] [stdout] 808 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/printer/src/standard.rs:828:9 [INFO] [stdout] | [INFO] [stdout] 828 | / if searcher.binary_detection().quit_byte().is_some() { [INFO] [stdout] 829 | | if let Some(ref path) = self.path { [INFO] [stdout] 830 | | log::debug!( [INFO] [stdout] 831 | | "ignoring {path}: found binary data at \ [INFO] [stdout] ... | [INFO] [stdout] 836 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 828 ~ if searcher.binary_detection().quit_byte().is_some() [INFO] [stdout] 829 ~ && let Some(ref path) = self.path { [INFO] [stdout] 830 | log::debug!( [INFO] [stdout] ... [INFO] [stdout] 834 | ); [INFO] [stdout] 835 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> crates/globset/src/fnv.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | self.0 = self.0 ^ u64::from(byte); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.0 ^= u64::from(byte)` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/printer/src/standard.rs:1524:30 [INFO] [stdout] | [INFO] [stdout] 1524 | trim_line_terminator(&self.searcher, buf, line); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.searcher` [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 `map_or` can be simplified [INFO] [stdout] --> crates/printer/src/standard.rs:1563:9 [INFO] [stdout] | [INFO] [stdout] 1563 | self.config().max_columns.map_or(false, |m| line.len() as u64 > m) [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] 1563 - self.config().max_columns.map_or(false, |m| line.len() as u64 > m) [INFO] [stdout] 1563 + self.config().max_columns.is_some_and(|m| line.len() as u64 > m) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.tokens.get(0)` [INFO] [stdout] --> crates/globset/src/glob.rs:357:28 [INFO] [stdout] | [INFO] [stdout] 357 | let start = match *self.tokens.get(0)? { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `self.tokens.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SummaryBuilder` [INFO] [stdout] --> crates/printer/src/summary.rs:153:5 [INFO] [stdout] | [INFO] [stdout] 153 | / pub fn new() -> SummaryBuilder { [INFO] [stdout] 154 | | SummaryBuilder { config: Config::default() } [INFO] [stdout] 155 | | } [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 151 + impl Default for SummaryBuilder { [INFO] [stdout] 152 + fn default() -> Self { [INFO] [stdout] 153 + Self::new() [INFO] [stdout] 154 + } [INFO] [stdout] 155 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.tokens.get(0)` [INFO] [stdout] --> crates/globset/src/glob.rs:467:38 [INFO] [stdout] | [INFO] [stdout] 467 | let (start, entire) = match *self.tokens.get(0)? { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `self.tokens.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/printer/src/summary.rs:476:5 [INFO] [stdout] | [INFO] [stdout] 476 | /// no file path is given, then this is `'static`. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 476 | /// no file path is given, then this is `'static`. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/printer/src/summary.rs:478:5 [INFO] [stdout] | [INFO] [stdout] 478 | /// borrows. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 478 | /// borrows. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/printer/src/summary.rs:480:5 [INFO] [stdout] | [INFO] [stdout] 480 | /// `grep_searcher::Searcher` that is reporting results to this sink. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 480 | /// `grep_searcher::Searcher` that is reporting results to this sink. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/printer/src/summary.rs:482:5 [INFO] [stdout] | [INFO] [stdout] 482 | /// output to. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 482 | /// output to. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.tokens.get(0)` [INFO] [stdout] --> crates/globset/src/glob.rs:514:28 [INFO] [stdout] | [INFO] [stdout] 514 | let start = match *self.tokens.get(0)? { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `self.tokens.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/globset/src/glob.rs:581:19 [INFO] [stdout] | [INFO] [stdout] 581 | glob: &self.glob, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `self.glob` [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 `if` statement can be collapsed [INFO] [stdout] --> crates/printer/src/summary.rs:684:9 [INFO] [stdout] | [INFO] [stdout] 684 | / if searcher.binary_detection().quit_byte().is_some() { [INFO] [stdout] 685 | | if let Some(ref path) = self.path { [INFO] [stdout] 686 | | log::debug!( [INFO] [stdout] 687 | | "ignoring {path}: found binary data at \ [INFO] [stdout] ... | [INFO] [stdout] 692 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 684 ~ if searcher.binary_detection().quit_byte().is_some() [INFO] [stdout] 685 ~ && let Some(ref path) = self.path { [INFO] [stdout] 686 | log::debug!( [INFO] [stdout] ... [INFO] [stdout] 690 | ); [INFO] [stdout] 691 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/globset/src/glob.rs:687:39 [INFO] [stdout] | [INFO] [stdout] 687 | self.tokens_to_regex(options, &self, &mut re); [INFO] [stdout] | ^^^^^ help: change this to: `self` [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: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> crates/printer/src/util.rs:51:31 [INFO] [stdout] | [INFO] [stdout] 51 | pub(crate) fn replace_all<'a>( [INFO] [stdout] | ^^ [INFO] [stdout] 52 | &'a mut self, [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] 51 ~ pub(crate) fn replace_all( [INFO] [stdout] 52 ~ &mut self, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> crates/printer/src/util.rs:61:62 [INFO] [stdout] | [INFO] [stdout] 61 | let is_multi_line = searcher.multi_line_with_matcher(&matcher); [INFO] [stdout] | ^^^^^^^^ help: change this to: `matcher` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> crates/globset/src/glob.rs:707:25 [INFO] [stdout] | [INFO] [stdout] 707 | re.push_str("."); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `re.push('.')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> crates/printer/src/util.rs:115:31 [INFO] [stdout] | [INFO] [stdout] 115 | pub(crate) fn replacement<'a>( [INFO] [stdout] | ^^ [INFO] [stdout] 116 | &'a self, [INFO] [stdout] | ^^ [INFO] [stdout] 117 | ) -> Option<(&'a [u8], &'a [Match])> { [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] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 115 ~ pub(crate) fn replacement( [INFO] [stdout] 116 ~ &self, [INFO] [stdout] 117 ~ ) -> Option<(&[u8], &[Match])> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/globset/src/glob.rs:747:55 [INFO] [stdout] | [INFO] [stdout] 747 | self.tokens_to_regex(options, &pat, &mut altre); [INFO] [stdout] | ^^^^ help: change this to: `pat` [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: match expression looks like `matches!` macro [INFO] [stdout] --> crates/printer/src/util.rs:458:9 [INFO] [stdout] | [INFO] [stdout] 458 | / match b { [INFO] [stdout] 459 | | b'\t' | b'\n' | b'\x0B' | b'\x0C' | b'\r' | b' ' => true, [INFO] [stdout] 460 | | _ => false, [INFO] [stdout] 461 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 458 - match b { [INFO] [stdout] 459 - b'\t' | b'\n' | b'\x0B' | b'\x0C' | b'\r' | b' ' => true, [INFO] [stdout] 460 - _ => false, [INFO] [stdout] 461 - } [INFO] [stdout] 458 + matches!(b, b'\t' | b'\n' | b'\x0B' | b'\x0C' | b'\r' | b' ') [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> crates/globset/src/glob.rs:857:20 [INFO] [stdout] | [INFO] [stdout] 857 | return Ok(pat.push(tok)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] = note: `#[warn(clippy::unit_arg)]` on by default [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 857 ~ return { [INFO] [stdout] 858 + let _: () = pat.push(tok); [INFO] [stdout] 859 + Ok(()) [INFO] [stdout] 860 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> crates/globset/src/glob.rs:872:18 [INFO] [stdout] | [INFO] [stdout] 872 | Some(ref pat) => Ok(!pat.is_empty()), [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 872 - Some(ref pat) => Ok(!pat.is_empty()), [INFO] [stdout] 872 + Some(pat) => Ok(!pat.is_empty()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> crates/globset/src/glob.rs:883:13 [INFO] [stdout] | [INFO] [stdout] 883 | Ok(self.branches.push(Tokens::default())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 883 ~ self.branches.push(Tokens::default()); [INFO] [stdout] 884 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/globset/src/glob.rs:909:17 [INFO] [stdout] | [INFO] [stdout] 909 | if !self.peek().map_or(true, is_separator) { [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_none_or` instead [INFO] [stdout] | [INFO] [stdout] 909 - if !self.peek().map_or(true, is_separator) { [INFO] [stdout] 909 + if !self.peek().is_none_or(is_separator) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/globset/src/glob.rs:914:25 [INFO] [stdout] | [INFO] [stdout] 914 | assert!(self.bump().map_or(true, is_separator)); [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_none_or` instead [INFO] [stdout] | [INFO] [stdout] 914 - assert!(self.bump().map_or(true, is_separator)); [INFO] [stdout] 914 + assert!(self.bump().is_none_or(is_separator)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/globset/src/glob.rs:919:9 [INFO] [stdout] | [INFO] [stdout] 919 | / if !prev.map(is_separator).unwrap_or(false) { [INFO] [stdout] 920 | | if self.branches.len() <= 1 [INFO] [stdout] 921 | | || (prev != Some(',') && prev != Some('{')) [INFO] [stdout] ... | [INFO] [stdout] 927 | | } [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] 919 ~ if !prev.map(is_separator).unwrap_or(false) [INFO] [stdout] 920 ~ && (self.branches.len() <= 1 [INFO] [stdout] 921 ~ || (prev != Some(',') && prev != Some('{'))) [INFO] [stdout] 922 | { [INFO] [stdout] ... [INFO] [stdout] 925 | return Ok(()); [INFO] [stdout] 926 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> crates/globset/src/glob.rs:996:27 [INFO] [stdout] | [INFO] [stdout] 996 | return if self.opts.allow_unclosed_class == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.opts.allow_unclosed_class` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/globset/src/glob.rs:1022:43 [INFO] [stdout] | [INFO] [stdout] 1022 | add_to_last_range(&self.glob, r, '-')?; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `self.glob` [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] --> crates/globset/src/glob.rs:1034:29 [INFO] [stdout] | [INFO] [stdout] 1034 | ... &self.glob, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `self.glob` [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: you are using an explicit closure for copying elements [INFO] [stdout] --> crates/globset/src/glob.rs:1061:9 [INFO] [stdout] | [INFO] [stdout] 1061 | self.chars.peek().map(|&ch| ch) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `self.chars.peek().copied()` [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] [INFO] [stdout] [INFO] [stderr] Checking grep v0.4.1 (/opt/rustwide/workdir/crates/grep) [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/grep/examples/simplegrep.rs:33:50 [INFO] [stdout] | [INFO] [stdout] 33 | let matcher = RegexMatcher::new_line_matcher(&pattern)?; [INFO] [stdout] | ^^^^^^^^ help: change this to: `pattern` [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 `if` statement can be collapsed [INFO] [stdout] --> crates/ignore/src/dir.rs:215:13 [INFO] [stdout] | [INFO] [stdout] 215 | / if let Some(weak) = compiled.get(parent.as_os_str()) { [INFO] [stdout] 216 | | if let Some(prebuilt) = weak.upgrade() { [INFO] [stdout] 217 | | ig = Ignore(prebuilt); [INFO] [stdout] 218 | | continue; [INFO] [stdout] 219 | | } [INFO] [stdout] 220 | | } [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] 215 ~ if let Some(weak) = compiled.get(parent.as_os_str()) [INFO] [stdout] 216 ~ && let Some(prebuilt) = weak.upgrade() { [INFO] [stdout] 217 | ig = Ignore(prebuilt); [INFO] [stdout] 218 | continue; [INFO] [stdout] 219 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/ignore/src/dir.rs:273:17 [INFO] [stdout] | [INFO] [stdout] 273 | &dir, [INFO] [stdout] | ^^^^ help: change this to: `dir` [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] --> crates/ignore/src/dir.rs:274:17 [INFO] [stdout] | [INFO] [stdout] 274 | &dir, [INFO] [stdout] | ^^^^ help: change this to: `dir` [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] --> crates/ignore/src/dir.rs:285:17 [INFO] [stdout] | [INFO] [stdout] 285 | &dir, [INFO] [stdout] | ^^^^ help: change this to: `dir` [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] --> crates/ignore/src/dir.rs:286:17 [INFO] [stdout] | [INFO] [stdout] 286 | &dir, [INFO] [stdout] | ^^^^ help: change this to: `dir` [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] --> crates/ignore/src/dir.rs:297:17 [INFO] [stdout] | [INFO] [stdout] 297 | &dir, [INFO] [stdout] | ^^^^ help: change this to: `dir` [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] --> crates/ignore/src/dir.rs:298:17 [INFO] [stdout] | [INFO] [stdout] 298 | &dir, [INFO] [stdout] | ^^^^ help: change this to: `dir` [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] --> crates/ignore/src/dir.rs:312:25 [INFO] [stdout] | [INFO] [stdout] 312 | &dir, [INFO] [stdout] | ^^^^ help: change this to: `dir` [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 `if` statement can be collapsed [INFO] [stdout] --> crates/ignore/src/dir.rs:472:9 [INFO] [stdout] | [INFO] [stdout] 472 | / if self.0.opts.parents { [INFO] [stdout] 473 | | if let Some(abs_parent_path) = self.absolute_base() { [INFO] [stdout] ... | [INFO] [stdout] 533 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 472 ~ if self.0.opts.parents [INFO] [stdout] 473 ~ && let Some(abs_parent_path) = self.absolute_base() { [INFO] [stdout] 474 | // What we want to do here is take the absolute base path of [INFO] [stdout] ... [INFO] [stdout] 531 | } [INFO] [stdout] 532 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> crates/ignore/src/dir.rs:538:37 [INFO] [stdout] | [INFO] [stdout] 538 | m_explicit = gi.matched(&path, is_dir).map(IgnoreMatch::gitignore); [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_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> crates/ignore/src/dir.rs:543:26 [INFO] [stdout] | [INFO] [stdout] 543 | .matched(&path, is_dir) [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_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/ignore/src/dir.rs:897:9 [INFO] [stdout] | [INFO] [stdout] 897 | if !git_type.map_or(false, |ft| ft.is_file()) { [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] 897 - if !git_type.map_or(false, |ft| ft.is_file()) { [INFO] [stdout] 897 + if !git_type.is_some_and(|ft| ft.is_file()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.as_ref().map(|p| &**p)` on an `Option` value [INFO] [stdout] --> crates/ignore/src/gitignore.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | self.from.as_ref().map(|p| &**p) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using as_deref: `self.from.as_deref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_as_ref_deref [INFO] [stdout] = note: `#[warn(clippy::option_as_ref_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/ignore/src/gitignore.rs:155:9 [INFO] [stdout] | [INFO] [stdout] 155 | &*self.root [INFO] [stdout] | ^^^^^^^^^^^ help: try: `&self.root` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/ignore/src/gitignore.rs:259:53 [INFO] [stdout] | [INFO] [stdout] 259 | self.set.matches_candidate_into(&candidate, &mut *matches); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `&mut matches` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/ignore/src/gitignore.rs:294:9 [INFO] [stdout] | [INFO] [stdout] 294 | / if self.root != Path::new(".") && !is_file_name(path) { [INFO] [stdout] 295 | | if let Some(p) = strip_prefix(&self.root, path) { [INFO] [stdout] 296 | | path = p; [INFO] [stdout] ... | [INFO] [stdout] 302 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 294 ~ if self.root != Path::new(".") && !is_file_name(path) [INFO] [stdout] 295 ~ && let Some(p) = strip_prefix(&self.root, path) { [INFO] [stdout] 296 | path = p; [INFO] [stdout] ... [INFO] [stdout] 300 | } [INFO] [stdout] 301 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> crates/ignore/src/gitignore.rs:351:46 [INFO] [stdout] | [INFO] [stdout] 351 | matches: Some(Arc::new(Pool::new(|| vec![]))), [INFO] [stdout] | ^^^^^^^^^ help: replace the closure with `Vec::new`: `std::vec::Vec::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/ignore/src/gitignore.rs:416:71 [INFO] [stdout] | [INFO] [stdout] 416 | if let Err(err) = self.add_line(Some(path.to_path_buf()), &line) { [INFO] [stdout] | ^^^^^ help: change this to: `line` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> crates/ignore/src/gitignore.rs:575:5 [INFO] [stdout] | [INFO] [stdout] 575 | / match gitconfig_home_contents().and_then(|x| parse_excludes_file(&x)) { [INFO] [stdout] 576 | | Some(path) => return Some(path), [INFO] [stdout] 577 | | None => {} [INFO] [stdout] 578 | | } [INFO] [stdout] | |_____^ help: try: `if let Some(path) = gitconfig_home_contents().and_then(|x| parse_excludes_file(&x)) { return Some(path) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> crates/ignore/src/gitignore.rs:579:5 [INFO] [stdout] | [INFO] [stdout] 579 | / match gitconfig_xdg_contents().and_then(|x| parse_excludes_file(&x)) { [INFO] [stdout] 580 | | Some(path) => return Some(path), [INFO] [stdout] 581 | | None => {} [INFO] [stdout] 582 | | } [INFO] [stdout] | |_____^ help: try: `if let Some(path) = gitconfig_xdg_contents().and_then(|x| parse_excludes_file(&x)) { return Some(path) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> crates/ignore/src/gitignore.rs:589:16 [INFO] [stdout] | [INFO] [stdout] 589 | let home = match home_dir() { [INFO] [stdout] | ________________^ [INFO] [stdout] 590 | | None => return None, [INFO] [stdout] 591 | | Some(home) => home, [INFO] [stdout] 592 | | }; [INFO] [stdout] | |_____^ help: try instead: `home_dir()?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `name.as_bytes().get(0)` [INFO] [stdout] --> crates/ignore/src/pathutil.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | name.as_bytes().get(0) == Some(&b'.') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `name.as_bytes().first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/ignore/src/pathutil.rs:74:14 [INFO] [stdout] | [INFO] [stdout] 74 | Some(&Path::new(OsStr::from_bytes(&path[prefix.len()..]))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `Path::new(OsStr::from_bytes(&path[prefix.len()..]))` [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: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> crates/ignore/src/pathutil.rs:113:25 [INFO] [stdout] | [INFO] [stdout] 113 | pub(crate) fn file_name<'a, P: AsRef + ?Sized>( [INFO] [stdout] | ^^ [INFO] [stdout] 114 | path: &'a P, [INFO] [stdout] | ^^ [INFO] [stdout] 115 | ) -> Option<&'a OsStr> { [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] 113 ~ pub(crate) fn file_name + ?Sized>( [INFO] [stdout] 114 ~ path: &P, [INFO] [stdout] 115 ~ ) -> Option<&OsStr> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> crates/ignore/src/pathutil.rs:120:24 [INFO] [stdout] | [INFO] [stdout] 120 | if path.is_empty() { [INFO] [stdout] | ________________________^ [INFO] [stdout] 121 | | return None; [INFO] [stdout] 122 | | } else if path.len() == 1 && path[0] == b'.' { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> crates/ignore/src/pathutil.rs:122:50 [INFO] [stdout] | [INFO] [stdout] 122 | } else if path.len() == 1 && path[0] == b'.' { [INFO] [stdout] | __________________________________________________^ [INFO] [stdout] 123 | | return None; [INFO] [stdout] 124 | | } else if path.last() == Some(&b'.') { [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> crates/ignore/src/pathutil.rs:122:50 [INFO] [stdout] | [INFO] [stdout] 122 | } else if path.len() == 1 && path[0] == b'.' { [INFO] [stdout] | __________________________________________________^ [INFO] [stdout] 123 | | return None; [INFO] [stdout] 124 | | } else if path.last() == Some(&b'.') { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> crates/ignore/src/pathutil.rs:124:42 [INFO] [stdout] | [INFO] [stdout] 124 | } else if path.last() == Some(&b'.') { [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 125 | | return None; [INFO] [stdout] 126 | | } else if path.len() >= 2 && &path[path.len() - 2..] == &b".."[..] { [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> crates/ignore/src/pathutil.rs:124:42 [INFO] [stdout] | [INFO] [stdout] 124 | } else if path.last() == Some(&b'.') { [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 125 | | return None; [INFO] [stdout] 126 | | } else if path.len() >= 2 && &path[path.len() - 2..] == &b".."[..] { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> crates/ignore/src/pathutil.rs:126:72 [INFO] [stdout] | [INFO] [stdout] 126 | } else if path.len() >= 2 && &path[path.len() - 2..] == &b".."[..] { [INFO] [stdout] | ________________________________________________________________________^ [INFO] [stdout] 127 | | return None; [INFO] [stdout] 128 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> crates/ignore/src/pathutil.rs:126:34 [INFO] [stdout] | [INFO] [stdout] 126 | } else if path.len() >= 2 && &path[path.len() - 2..] == &b".."[..] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 126 - } else if path.len() >= 2 && &path[path.len() - 2..] == &b".."[..] { [INFO] [stdout] 126 + } else if path.len() >= 2 && path[path.len() - 2..] == b".."[..] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> crates/ignore/src/types.rs:234:41 [INFO] [stdout] | [INFO] [stdout] 234 | matches: Arc::new(Pool::new(|| vec![])), [INFO] [stdout] | ^^^^^^^^^ help: replace the closure with `Vec::new`: `std::vec::Vec::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/ignore/src/types.rs:283:37 [INFO] [stdout] | [INFO] [stdout] 283 | self.set.matches_into(name, &mut *matches); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `&mut matches` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `TypesBuilder` [INFO] [stdout] --> crates/ignore/src/types.rs:316:5 [INFO] [stdout] | [INFO] [stdout] 316 | / pub fn new() -> TypesBuilder { [INFO] [stdout] 317 | | TypesBuilder { types: HashMap::new(), selections: vec![] } [INFO] [stdout] 318 | | } [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] 310 + impl Default for TypesBuilder { [INFO] [stdout] 311 + fn default() -> Self { [INFO] [stdout] 312 + Self::new() [INFO] [stdout] 313 + } [INFO] [stdout] 314 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> crates/ignore/src/types.rs:360:41 [INFO] [stdout] | [INFO] [stdout] 360 | matches: Arc::new(Pool::new(|| vec![])), [INFO] [stdout] | ^^^^^^^^^ help: replace the closure with `Vec::new`: `std::vec::Vec::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> crates/ignore/src/types.rs:436:9 [INFO] [stdout] | [INFO] [stdout] 436 | /// given name with the given glob. [INFO] [stdout] | ^^^^ help: try using ` ` (3 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] = note: `#[warn(clippy::doc_overindented_list_items)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> crates/ignore/src/types.rs:438:9 [INFO] [stdout] | [INFO] [stdout] 438 | /// This defines an 'include' definition that associates the given name [INFO] [stdout] | ^^^^ help: try using ` ` (3 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> crates/ignore/src/types.rs:439:9 [INFO] [stdout] | [INFO] [stdout] 439 | /// with the definitions of the given existing types. [INFO] [stdout] | ^^^^ help: try using ` ` (3 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/types.rs:440:9 [INFO] [stdout] | [INFO] [stdout] 440 | /// Names may not include any characters that are not [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 440 | /// Names may not include any characters that are not [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/types.rs:441:9 [INFO] [stdout] | [INFO] [stdout] 441 | /// Unicode letters or numbers. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 441 | /// Unicode letters or numbers. [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> crates/core/messages.rs:73:12 [INFO] [stdout] | [INFO] [stdout] 73 | if crate::messages::messages() { [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] = note: `#[warn(clippy::crate_in_macro_def)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> crates/core/messages.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | crate::messages::set_errored(); [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> crates/core/messages.rs:94:12 [INFO] [stdout] | [INFO] [stdout] 94 | if crate::messages::messages() && crate::messages::ignore_messages() { [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> crates/core/flags/complete/mod.rs:5:20 [INFO] [stdout] | [INFO] [stdout] 5 | static ENCODINGS: &'static str = include_str!("encodings.sh"); [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] --> crates/core/flags/complete/bash.rs:7:23 [INFO] [stdout] | [INFO] [stdout] 7 | const TEMPLATE_FULL: &'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] --> crates/core/flags/complete/bash.rs:45:23 [INFO] [stdout] | [INFO] [stdout] 45 | const TEMPLATE_CASE: &'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] --> crates/core/flags/complete/bash.rs:52:31 [INFO] [stdout] | [INFO] [stdout] 52 | const TEMPLATE_CASE_CHOICES: &'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] --> crates/core/flags/complete/fish.rs:7:18 [INFO] [stdout] | [INFO] [stdout] 7 | const TEMPLATE: &'static str = "complete -c rg !SHORT! -l !LONG! -d '!DOC!'"; [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] --> crates/core/flags/complete/fish.rs:8:26 [INFO] [stdout] | [INFO] [stdout] 8 | const TEMPLATE_NEGATED: &'static str = "complete -c rg -l !NEGATED! -n '__rg_contains_opt !LONG! !SHORT!' -d '!DOC!'\n"; [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] --> crates/core/flags/complete/powershell.rs:7:18 [INFO] [stdout] | [INFO] [stdout] 7 | const TEMPLATE: &'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] --> crates/core/flags/complete/powershell.rs:37:23 [INFO] [stdout] | [INFO] [stdout] 37 | const TEMPLATE_FLAG: &'static str = "[CompletionResult]::new('!DASH_NAME!', '!NAME!', [CompletionResultType]::ParameterName, '!DOC!')"; [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: match expression looks like `matches!` macro [INFO] [stdout] --> crates/ignore/src/walk.rs:165:9 [INFO] [stdout] | [INFO] [stdout] 165 | / match *self { [INFO] [stdout] 166 | | DirEntryInner::Stdin => true, [INFO] [stdout] 167 | | _ => false, [INFO] [stdout] 168 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 165 - match *self { [INFO] [stdout] 166 - DirEntryInner::Stdin => true, [INFO] [stdout] 167 - _ => false, [INFO] [stdout] 168 - } [INFO] [stdout] 165 + matches!(*self, DirEntryInner::Stdin) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/ignore/src/walk.rs:175:37 [INFO] [stdout] | [INFO] [stdout] 175 | let err = Error::Io(io::Error::new( [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 176 | | io::ErrorKind::Other, [INFO] [stdout] 177 | | " has no metadata", [INFO] [stdout] 178 | | )); [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 175 ~ let err = Error::Io(io::Error::other( [INFO] [stdout] 176 ~ " has no metadata", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> crates/core/flags/doc/help.rs:13:24 [INFO] [stdout] | [INFO] [stdout] 13 | const TEMPLATE_SHORT: &'static str = include_str!("template.short.help"); [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] --> crates/core/flags/doc/help.rs:14:23 [INFO] [stdout] | [INFO] [stdout] 14 | const TEMPLATE_LONG: &'static str = include_str!("template.long.help"); [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: useless conversion to the same type: `std::io::Error` [INFO] [stdout] --> crates/ignore/src/walk.rs:302:34 [INFO] [stdout] | [INFO] [stdout] 302 | .map_err(|err| Error::Io(io::Error::from(err)).with_path(&self.path)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider removing `io::Error::from()`: `err` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::io::Error` [INFO] [stdout] --> crates/ignore/src/walk.rs:327:33 [INFO] [stdout] | [INFO] [stdout] 327 | let err = Error::Io(io::Error::from(err)).with_path(ent.path()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider removing `io::Error::from()`: `err` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> crates/core/flags/doc/man.rs:9:18 [INFO] [stdout] | [INFO] [stdout] 9 | const TEMPLATE: &'static str = include_str!("template.rg.1"); [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: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:456:5 [INFO] [stdout] | [INFO] [stdout] 456 | /// then matching stops. The path is then only skipped if the glob that matched [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 456 | /// then matching stops. The path is then only skipped if the glob that matched [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:457:5 [INFO] [stdout] | [INFO] [stdout] 457 | /// the path is an ignore glob. (An override glob is a whitelist glob unless it [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 457 | /// the path is an ignore glob. (An override glob is a whitelist glob unless it [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:458:5 [INFO] [stdout] | [INFO] [stdout] 458 | /// starts with a `!`, in which case it is an ignore glob.) [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 458 | /// starts with a `!`, in which case it is an ignore glob.) [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:460:5 [INFO] [stdout] | [INFO] [stdout] 460 | /// git ignore files (`.gitignore`, `.git/info/exclude` and the configured [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 460 | /// git ignore files (`.gitignore`, `.git/info/exclude` and the configured [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:461:5 [INFO] [stdout] | [INFO] [stdout] 461 | /// global gitignore file), plain `.ignore` files, which have the same format [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 461 | /// global gitignore file), plain `.ignore` files, which have the same format [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:462:5 [INFO] [stdout] | [INFO] [stdout] 462 | /// as gitignore files, or explicitly added ignore files. The precedence order [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 462 | /// as gitignore files, or explicitly added ignore files. The precedence order [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:463:5 [INFO] [stdout] | [INFO] [stdout] 463 | /// is: `.ignore`, `.gitignore`, `.git/info/exclude`, global gitignore and [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 463 | /// is: `.ignore`, `.gitignore`, `.git/info/exclude`, global gitignore and [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:464:5 [INFO] [stdout] | [INFO] [stdout] 464 | /// finally explicitly added ignore files. Note that precedence between [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 464 | /// finally explicitly added ignore files. Note that precedence between [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:465:5 [INFO] [stdout] | [INFO] [stdout] 465 | /// different types of ignore files is not impacted by the directory hierarchy; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 465 | /// different types of ignore files is not impacted by the directory hierarchy; [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:466:5 [INFO] [stdout] | [INFO] [stdout] 466 | /// any `.ignore` file overrides all `.gitignore` files. Within each precedence [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 466 | /// any `.ignore` file overrides all `.gitignore` files. Within each precedence [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:467:5 [INFO] [stdout] | [INFO] [stdout] 467 | /// level, more nested ignore files have a higher precedence than less nested [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 467 | /// level, more nested ignore files have a higher precedence than less nested [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:468:5 [INFO] [stdout] | [INFO] [stdout] 468 | /// ignore files. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 468 | /// ignore files. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:470:5 [INFO] [stdout] | [INFO] [stdout] 470 | /// is stopped and the path is skipped. If it yields a whitelist match, then [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 470 | /// is stopped and the path is skipped. If it yields a whitelist match, then [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:471:5 [INFO] [stdout] | [INFO] [stdout] 471 | /// matching continues. A whitelist match can be overridden by a later matcher. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 471 | /// matching continues. A whitelist match can be overridden by a later matcher. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:473:5 [INFO] [stdout] | [INFO] [stdout] 473 | /// the path. As above, if it yields an ignore match, then all matching is [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 473 | /// the path. As above, if it yields an ignore match, then all matching is [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:474:5 [INFO] [stdout] | [INFO] [stdout] 474 | /// stopped and the path is skipped. If it yields a whitelist match, then [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 474 | /// stopped and the path is skipped. If it yields a whitelist match, then [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:475:5 [INFO] [stdout] | [INFO] [stdout] 475 | /// matching continues. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 475 | /// matching continues. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:477:5 [INFO] [stdout] | [INFO] [stdout] 477 | /// path is skipped. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 477 | /// path is skipped. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:479:5 [INFO] [stdout] | [INFO] [stdout] 479 | /// against the max filesize limit. If it exceeds the limit, it is skipped. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 479 | /// against the max filesize limit. If it exceeds the limit, it is skipped. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/ignore/src/walk.rs:481:5 [INFO] [stdout] | [INFO] [stdout] 481 | /// iterator. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 481 | /// iterator. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> crates/ignore/src/walk.rs:511:12 [INFO] [stdout] | [INFO] [stdout] 511 | ByName(Arc Ordering + Send + Sync + 'static>), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> crates/ignore/src/walk.rs:512:12 [INFO] [stdout] | [INFO] [stdout] 512 | ByPath(Arc Ordering + Send + Sync + 'static>), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.max_filesize` after checking its variant with `is_some` [INFO] [stdout] --> crates/ignore/src/walk.rs:1080:17 [INFO] [stdout] | [INFO] [stdout] 1078 | if self.max_filesize.is_some() && !ent.is_dir() { [INFO] [stdout] | --------------------------- the check is happening here [INFO] [stdout] 1079 | return Ok(skip_filesize( [INFO] [stdout] 1080 | self.max_filesize.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/ignore/src/walk.rs:1073:9 [INFO] [stdout] | [INFO] [stdout] 1073 | / if let Some(ref stdout) = self.skip { [INFO] [stdout] 1074 | | if path_equals(ent, stdout)? { [INFO] [stdout] 1075 | | return Ok(true); [INFO] [stdout] 1076 | | } [INFO] [stdout] 1077 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1073 ~ if let Some(ref stdout) = self.skip [INFO] [stdout] 1074 ~ && path_equals(ent, stdout)? { [INFO] [stdout] 1075 | return Ok(true); [INFO] [stdout] 1076 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/ignore/src/walk.rs:1085:9 [INFO] [stdout] | [INFO] [stdout] 1085 | / if let Some(Filter(filter)) = &self.filter { [INFO] [stdout] 1086 | | if !filter(ent) { [INFO] [stdout] 1087 | | return Ok(true); [INFO] [stdout] 1088 | | } [INFO] [stdout] 1089 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1085 ~ if let Some(Filter(filter)) = &self.filter [INFO] [stdout] 1086 ~ && !filter(ent) { [INFO] [stdout] 1087 | return Ok(true); [INFO] [stdout] 1088 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> crates/ignore/src/walk.rs:1261:6 [INFO] [stdout] | [INFO] [stdout] 1261 | impl<'a, 's, P: ParallelVisitorBuilder<'s>> ParallelVisitorBuilder<'s> [INFO] [stdout] | ^^ [INFO] [stdout] 1262 | for &'a mut P [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] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 1261 ~ impl<'s, P: ParallelVisitorBuilder<'s>> ParallelVisitorBuilder<'s> [INFO] [stdout] 1262 ~ for &mut P [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/ignore/src/walk.rs:1485:9 [INFO] [stdout] | [INFO] [stdout] 1485 | self.dent.file_type().map_or(false, |ft| ft.is_symlink()) [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] 1485 - self.dent.file_type().map_or(false, |ft| ft.is_symlink()) [INFO] [stdout] 1485 + self.dent.file_type().is_some_and(|ft| ft.is_symlink()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/ignore/src/walk.rs:1712:12 [INFO] [stdout] | [INFO] [stdout] 1712 | if self.max_depth.map_or(false, |max| depth >= max) { [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] 1712 - if self.max_depth.map_or(false, |max| depth >= max) { [INFO] [stdout] 1712 + if self.max_depth.is_some_and(|max| depth >= max) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.max_filesize` after checking its variant with `is_some` [INFO] [stdout] --> crates/ignore/src/walk.rs:1795:21 [INFO] [stdout] | [INFO] [stdout] 1793 | if self.max_filesize.is_some() && !dent.is_dir() { [INFO] [stdout] | --------------------------- the check is happening here [INFO] [stdout] 1794 | skip_filesize( [INFO] [stdout] 1795 | self.max_filesize.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/ignore/src/walk.rs:1763:26 [INFO] [stdout] | [INFO] [stdout] 1763 | let is_symlink = dent.file_type().map_or(false, |ft| ft.is_symlink()); [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] 1763 - let is_symlink = dent.file_type().map_or(false, |ft| ft.is_symlink()); [INFO] [stdout] 1763 + let is_symlink = dent.file_type().is_some_and(|ft| ft.is_symlink()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/ignore/src/walk.rs:1772:13 [INFO] [stdout] | [INFO] [stdout] 1772 | / if dent.is_dir() { [INFO] [stdout] 1773 | | if let Err(err) = check_symlink_loop(ig, dent.path(), depth) { [INFO] [stdout] 1774 | | return self.visitor.visit(Err(err)); [INFO] [stdout] 1775 | | } [INFO] [stdout] 1776 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1772 ~ if dent.is_dir() [INFO] [stdout] 1773 ~ && let Err(err) = check_symlink_loop(ig, dent.path(), depth) { [INFO] [stdout] 1774 | return self.visitor.visit(Err(err)); [INFO] [stdout] 1775 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> crates/ignore/src/walk.rs:1933:20 [INFO] [stdout] | [INFO] [stdout] 1933 | let filesize = match *ent { [INFO] [stdout] | ____________________^ [INFO] [stdout] 1934 | | Some(ref md) => Some(md.len()), [INFO] [stdout] 1935 | | None => None, [INFO] [stdout] 1936 | | }; [INFO] [stdout] | |_____^ help: try: `(*ent).as_ref().map(|md| md.len())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> crates/core/logger.rs:19:16 [INFO] [stdout] | [INFO] [stdout] 19 | const LOGGER: &'static Logger = &Logger(()); [INFO] [stdout] | -^^^^^^^------- help: consider removing `'static`: `&Logger` [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 `map_or` can be simplified [INFO] [stdout] --> crates/ignore/src/walk.rs:2024:5 [INFO] [stdout] | [INFO] [stdout] 2024 | dent.path().metadata().ok().map_or(false, |md| md.file_type().is_dir()) [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] 2024 - dent.path().metadata().ok().map_or(false, |md| md.file_type().is_dir()) [INFO] [stdout] 2024 + dent.path().metadata().ok().is_some_and(|md| md.file_type().is_dir()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Path` [INFO] [stdout] --> crates/core/ripgrep_config.rs:15:17 [INFO] [stdout] | [INFO] [stdout] 15 | use std::path::{Path, PathBuf}; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> crates/ignore/src/walk.rs:2186:44 [INFO] [stdout] | [INFO] [stdout] 2186 | builder.add_custom_ignore_filename(&custom_ignore); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `custom_ignore` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> crates/ignore/src/walk.rs:2206:44 [INFO] [stdout] | [INFO] [stdout] 2206 | builder.add_custom_ignore_filename(&custom_ignore); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `custom_ignore` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/ignore/src/walk.rs:2320:13 [INFO] [stdout] | [INFO] [stdout] 2320 | &builder.min_depth(Some(0)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `builder.min_depth(Some(0))` [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 import is redundant [INFO] [stdout] --> crates/core/simd.rs:11:1 [INFO] [stdout] | [INFO] [stdout] 11 | use memchr; [INFO] [stdout] | ^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/ignore/src/walk.rs:2325:13 [INFO] [stdout] | [INFO] [stdout] 2325 | &builder.min_depth(Some(1)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `builder.min_depth(Some(1))` [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] --> crates/ignore/src/walk.rs:2393:13 [INFO] [stdout] | [INFO] [stdout] 2393 | &builder.follow_links(true), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `builder.follow_links(true)` [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 conversion to the same type: `walk::Walk` [INFO] [stdout] --> crates/ignore/src/walk.rs:2404:21 [INFO] [stdout] | [INFO] [stdout] 2404 | let dents = WalkBuilder::new(td.path().join("foo")) [INFO] [stdout] | _____________________^ [INFO] [stdout] 2405 | | .build() [INFO] [stdout] 2406 | | .into_iter() [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 2404 ~ let dents = WalkBuilder::new(td.path().join("foo")) [INFO] [stdout] 2405 + .build() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/ignore/src/walk.rs:2428:33 [INFO] [stdout] | [INFO] [stdout] 2428 | assert_paths(td.path(), &builder.follow_links(true), &["a", "a/b"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `builder.follow_links(true)` [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: the borrowed expression implements the required traits [INFO] [stdout] --> crates/ignore/src/walk.rs:2475:25 [INFO] [stdout] | [INFO] [stdout] 2475 | if fs::read_dir(&dir_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^ help: change this to: `dir_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> crates/ignore/src/walk.rs:2480:40 [INFO] [stdout] | [INFO] [stdout] 2480 | let builder = WalkBuilder::new(&dir_path); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `dir_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/ignore/src/walk.rs:2500:13 [INFO] [stdout] | [INFO] [stdout] 2500 | / &WalkBuilder::new(td.path()) [INFO] [stdout] 2501 | | .filter_entry(|entry| entry.file_name() != OsStr::new("a")), [INFO] [stdout] | |___________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 2500 ~ WalkBuilder::new(td.path()) [INFO] [stdout] 2501 ~ .filter_entry(|entry| entry.file_name() != OsStr::new("a")), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:542:31 [INFO] [stdout] | [INFO] [stdout] 542 | matched!(match1, types(), vec!["rust"], vec![], "lib.rs"); [INFO] [stdout] | ^^^^^^^^^^^^ help: you can use an array directly: `["rust"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:542:45 [INFO] [stdout] | [INFO] [stdout] 542 | matched!(match1, types(), vec!["rust"], vec![], "lib.rs"); [INFO] [stdout] | ^^^^^^ help: you can use an array directly: `[]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:543:31 [INFO] [stdout] | [INFO] [stdout] 543 | matched!(match2, types(), vec!["html"], vec![], "index.html"); [INFO] [stdout] | ^^^^^^^^^^^^ help: you can use an array directly: `["html"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:543:45 [INFO] [stdout] | [INFO] [stdout] 543 | matched!(match2, types(), vec!["html"], vec![], "index.html"); [INFO] [stdout] | ^^^^^^ help: you can use an array directly: `[]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:544:31 [INFO] [stdout] | [INFO] [stdout] 544 | matched!(match3, types(), vec!["html"], vec![], "index.htm"); [INFO] [stdout] | ^^^^^^^^^^^^ help: you can use an array directly: `["html"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:544:45 [INFO] [stdout] | [INFO] [stdout] 544 | matched!(match3, types(), vec!["html"], vec![], "index.htm"); [INFO] [stdout] | ^^^^^^ help: you can use an array directly: `[]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:545:31 [INFO] [stdout] | [INFO] [stdout] 545 | matched!(match4, types(), vec!["html", "rust"], vec![], "main.rs"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["html", "rust"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:545:53 [INFO] [stdout] | [INFO] [stdout] 545 | matched!(match4, types(), vec!["html", "rust"], vec![], "main.rs"); [INFO] [stdout] | ^^^^^^ help: you can use an array directly: `[]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:546:31 [INFO] [stdout] | [INFO] [stdout] 546 | matched!(match5, types(), vec![], vec![], "index.html"); [INFO] [stdout] | ^^^^^^ help: you can use an array directly: `[]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:546:39 [INFO] [stdout] | [INFO] [stdout] 546 | matched!(match5, types(), vec![], vec![], "index.html"); [INFO] [stdout] | ^^^^^^ help: you can use an array directly: `[]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:547:31 [INFO] [stdout] | [INFO] [stdout] 547 | matched!(match6, types(), vec![], vec!["rust"], "index.html"); [INFO] [stdout] | ^^^^^^ help: you can use an array directly: `[]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:547:39 [INFO] [stdout] | [INFO] [stdout] 547 | matched!(match6, types(), vec![], vec!["rust"], "index.html"); [INFO] [stdout] | ^^^^^^^^^^^^ help: you can use an array directly: `["rust"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:548:31 [INFO] [stdout] | [INFO] [stdout] 548 | matched!(match7, types(), vec!["foo"], vec!["rust"], "main.foo"); [INFO] [stdout] | ^^^^^^^^^^^ help: you can use an array directly: `["foo"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:548:44 [INFO] [stdout] | [INFO] [stdout] 548 | matched!(match7, types(), vec!["foo"], vec!["rust"], "main.foo"); [INFO] [stdout] | ^^^^^^^^^^^^ help: you can use an array directly: `["rust"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:549:31 [INFO] [stdout] | [INFO] [stdout] 549 | matched!(match8, types(), vec!["combo"], vec![], "index.html"); [INFO] [stdout] | ^^^^^^^^^^^^^ help: you can use an array directly: `["combo"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:549:46 [INFO] [stdout] | [INFO] [stdout] 549 | matched!(match8, types(), vec!["combo"], vec![], "index.html"); [INFO] [stdout] | ^^^^^^ help: you can use an array directly: `[]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:550:31 [INFO] [stdout] | [INFO] [stdout] 550 | matched!(match9, types(), vec!["combo"], vec![], "lib.rs"); [INFO] [stdout] | ^^^^^^^^^^^^^ help: you can use an array directly: `["combo"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:550:46 [INFO] [stdout] | [INFO] [stdout] 550 | matched!(match9, types(), vec!["combo"], vec![], "lib.rs"); [INFO] [stdout] | ^^^^^^ help: you can use an array directly: `[]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:551:32 [INFO] [stdout] | [INFO] [stdout] 551 | matched!(match10, types(), vec!["py"], vec![], "main.py"); [INFO] [stdout] | ^^^^^^^^^^ help: you can use an array directly: `["py"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:551:44 [INFO] [stdout] | [INFO] [stdout] 551 | matched!(match10, types(), vec!["py"], vec![], "main.py"); [INFO] [stdout] | ^^^^^^ help: you can use an array directly: `[]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:552:32 [INFO] [stdout] | [INFO] [stdout] 552 | matched!(match11, types(), vec!["python"], vec![], "main.py"); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: you can use an array directly: `["python"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:552:48 [INFO] [stdout] | [INFO] [stdout] 552 | matched!(match11, types(), vec!["python"], vec![], "main.py"); [INFO] [stdout] | ^^^^^^ help: you can use an array directly: `[]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:554:39 [INFO] [stdout] | [INFO] [stdout] 554 | matched!(not, matchnot1, types(), vec!["rust"], vec![], "index.html"); [INFO] [stdout] | ^^^^^^^^^^^^ help: you can use an array directly: `["rust"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:554:53 [INFO] [stdout] | [INFO] [stdout] 554 | matched!(not, matchnot1, types(), vec!["rust"], vec![], "index.html"); [INFO] [stdout] | ^^^^^^ help: you can use an array directly: `[]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:555:39 [INFO] [stdout] | [INFO] [stdout] 555 | matched!(not, matchnot2, types(), vec![], vec!["rust"], "main.rs"); [INFO] [stdout] | ^^^^^^ help: you can use an array directly: `[]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:555:47 [INFO] [stdout] | [INFO] [stdout] 555 | matched!(not, matchnot2, types(), vec![], vec!["rust"], "main.rs"); [INFO] [stdout] | ^^^^^^^^^^^^ help: you can use an array directly: `["rust"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:556:39 [INFO] [stdout] | [INFO] [stdout] 556 | matched!(not, matchnot3, types(), vec!["foo"], vec!["rust"], "main.rs"); [INFO] [stdout] | ^^^^^^^^^^^ help: you can use an array directly: `["foo"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:556:52 [INFO] [stdout] | [INFO] [stdout] 556 | matched!(not, matchnot3, types(), vec!["foo"], vec!["rust"], "main.rs"); [INFO] [stdout] | ^^^^^^^^^^^^ help: you can use an array directly: `["rust"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:557:39 [INFO] [stdout] | [INFO] [stdout] 557 | matched!(not, matchnot4, types(), vec!["rust"], vec!["foo"], "main.rs"); [INFO] [stdout] | ^^^^^^^^^^^^ help: you can use an array directly: `["rust"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:557:53 [INFO] [stdout] | [INFO] [stdout] 557 | matched!(not, matchnot4, types(), vec!["rust"], vec!["foo"], "main.rs"); [INFO] [stdout] | ^^^^^^^^^^^ help: you can use an array directly: `["foo"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:558:39 [INFO] [stdout] | [INFO] [stdout] 558 | matched!(not, matchnot5, types(), vec!["rust"], vec!["foo"], "main.foo"); [INFO] [stdout] | ^^^^^^^^^^^^ help: you can use an array directly: `["rust"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:558:53 [INFO] [stdout] | [INFO] [stdout] 558 | matched!(not, matchnot5, types(), vec!["rust"], vec!["foo"], "main.foo"); [INFO] [stdout] | ^^^^^^^^^^^ help: you can use an array directly: `["foo"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:559:39 [INFO] [stdout] | [INFO] [stdout] 559 | matched!(not, matchnot6, types(), vec!["combo"], vec![], "leftpad.js"); [INFO] [stdout] | ^^^^^^^^^^^^^ help: you can use an array directly: `["combo"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:559:54 [INFO] [stdout] | [INFO] [stdout] 559 | matched!(not, matchnot6, types(), vec!["combo"], vec![], "leftpad.js"); [INFO] [stdout] | ^^^^^^ help: you can use an array directly: `[]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:560:39 [INFO] [stdout] | [INFO] [stdout] 560 | matched!(not, matchnot7, types(), vec!["py"], vec![], "index.html"); [INFO] [stdout] | ^^^^^^^^^^ help: you can use an array directly: `["py"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:560:51 [INFO] [stdout] | [INFO] [stdout] 560 | matched!(not, matchnot7, types(), vec!["py"], vec![], "index.html"); [INFO] [stdout] | ^^^^^^ help: you can use an array directly: `[]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:561:39 [INFO] [stdout] | [INFO] [stdout] 561 | matched!(not, matchnot8, types(), vec!["python"], vec![], "doc.md"); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: you can use an array directly: `["python"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/ignore/src/types.rs:561:55 [INFO] [stdout] | [INFO] [stdout] 561 | matched!(not, matchnot8, types(), vec!["python"], vec![], "doc.md"); [INFO] [stdout] | ^^^^^^ help: you can use an array directly: `[]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> crates/globset/src/pathutil.rs:50:23 [INFO] [stdout] | [INFO] [stdout] 50 | let last_dot_at = match name.rfind_byte(b'.') { [INFO] [stdout] | _______________________^ [INFO] [stdout] 51 | | None => return None, [INFO] [stdout] 52 | | Some(i) => i, [INFO] [stdout] 53 | | }; [INFO] [stdout] | |_____^ help: try instead: `name.rfind_byte(b'.')?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.as_ref().map(|s| &**s)` on an `Option` value [INFO] [stdout] --> crates/globset/src/lib.rs:207:9 [INFO] [stdout] | [INFO] [stdout] 207 | self.glob.as_ref().map(|s| &**s) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using as_deref: `self.glob.as_deref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_as_ref_deref [INFO] [stdout] = note: `#[warn(clippy::option_as_ref_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `GlobSetBuilder` [INFO] [stdout] --> crates/globset/src/lib.rs:574:5 [INFO] [stdout] | [INFO] [stdout] 574 | / pub fn new() -> GlobSetBuilder { [INFO] [stdout] 575 | | GlobSetBuilder { pats: vec![] } [INFO] [stdout] 576 | | } [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] 570 + impl Default for GlobSetBuilder { [INFO] [stdout] 571 + fn default() -> Self { [INFO] [stdout] 572 + Self::new() [INFO] [stdout] 573 + } [INFO] [stdout] 574 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/globset/src/lib.rs:641:37 [INFO] [stdout] | [INFO] [stdout] 641 | if self.path.len() <= max { &*self.path } else { &self.path[..max] } [INFO] [stdout] | ^^^^^^^^^^^ help: try: `&self.path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/globset/src/lib.rs:646:13 [INFO] [stdout] | [INFO] [stdout] 646 | &*self.path [INFO] [stdout] | ^^^^^^^^^^^ help: try: `&self.path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> crates/globset/src/lib.rs:867:21 [INFO] [stdout] | [INFO] [stdout] 867 | for &(_, ref re) in regexes { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] = note: `#[warn(clippy::needless_borrowed_reference)]` on by default [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 867 - for &(_, ref re) in regexes { [INFO] [stdout] 867 + for (_, re) in regexes { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Color` which implements the `Copy` trait [INFO] [stdout] --> crates/printer/src/color.rs:276:35 [INFO] [stdout] | [INFO] [stdout] 276 | cspec.set_fg(Some(color.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*color` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Color` which implements the `Copy` trait [INFO] [stdout] --> crates/printer/src/color.rs:279:35 [INFO] [stdout] | [INFO] [stdout] 279 | cspec.set_bg(Some(color.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*color` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> crates/printer/src/hyperlink/mod.rs:495:43 [INFO] [stdout] | [INFO] [stdout] 495 | let is_valid_scheme_char = |byte| match byte { [INFO] [stdout] | ___________________________________________^ [INFO] [stdout] 496 | | b'0'..=b'9' | b'A'..=b'Z' | b'a'..=b'z' | b'+' | b'-' | b'.' => { [INFO] [stdout] 497 | | true [INFO] [stdout] ... | [INFO] [stdout] 500 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 495 - let is_valid_scheme_char = |byte| match byte { [INFO] [stdout] 496 - b'0'..=b'9' | b'A'..=b'Z' | b'a'..=b'z' | b'+' | b'-' | b'.' => { [INFO] [stdout] 497 - true [INFO] [stdout] 498 - } [INFO] [stdout] 499 - _ => false, [INFO] [stdout] 500 - }; [INFO] [stdout] 495 + let is_valid_scheme_char = |byte| matches!(byte, b'0'..=b'9' | b'A'..=b'Z' | b'a'..=b'z' | b'+' | b'-' | b'.'); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `iter().cloned().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable [INFO] [stdout] --> crates/printer/src/hyperlink/mod.rs:947:30 [INFO] [stdout] | [INFO] [stdout] 947 | HYPERLINK_PATTERN_ALIASES.iter().cloned().collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_cloned_collect [INFO] [stdout] = note: `#[warn(clippy::iter_cloned_collect)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `JSONBuilder` [INFO] [stdout] --> crates/printer/src/json.rs:60:5 [INFO] [stdout] | [INFO] [stdout] 60 | / pub fn new() -> JSONBuilder { [INFO] [stdout] 61 | | JSONBuilder { config: Config::default() } [INFO] [stdout] 62 | | } [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] 58 + impl Default for JSONBuilder { [INFO] [stdout] 59 + fn default() -> Self { [INFO] [stdout] 60 + Self::new() [INFO] [stdout] 61 + } [INFO] [stdout] 62 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/printer/src/json.rs:588:5 [INFO] [stdout] | [INFO] [stdout] 588 | /// no file path is given, then this is `'static`. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 588 | /// no file path is given, then this is `'static`. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/printer/src/json.rs:590:5 [INFO] [stdout] | [INFO] [stdout] 590 | /// borrows. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 590 | /// borrows. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/printer/src/json.rs:592:5 [INFO] [stdout] | [INFO] [stdout] 592 | /// `grep_searcher::Searcher` that is reporting results to this sink. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 592 | /// `grep_searcher::Searcher` that is reporting results to this sink. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/printer/src/json.rs:594:5 [INFO] [stdout] | [INFO] [stdout] 594 | /// output to. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 594 | /// output to. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> crates/printer/src/json.rs:695:66 [INFO] [stdout] | [INFO] [stdout] 695 | (*self.json.config.replacement).as_ref().map(|r| &*r).unwrap(); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 695 - (*self.json.config.replacement).as_ref().map(|r| &*r).unwrap(); [INFO] [stdout] 695 + (*self.json.config.replacement).as_ref().map(|r| r).unwrap(); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 695 | (*self.json.config.replacement).as_ref().map(|r| &**r).unwrap(); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/printer/src/json.rs:790:9 [INFO] [stdout] | [INFO] [stdout] 790 | / if searcher.binary_detection().quit_byte().is_some() { [INFO] [stdout] 791 | | if let Some(ref path) = self.path { [INFO] [stdout] 792 | | log::debug!( [INFO] [stdout] 793 | | "ignoring {path}: found binary data at \ [INFO] [stdout] ... | [INFO] [stdout] 798 | | } [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] 790 ~ if searcher.binary_detection().quit_byte().is_some() [INFO] [stdout] 791 ~ && let Some(ref path) = self.path { [INFO] [stdout] 792 | log::debug!( [INFO] [stdout] ... [INFO] [stdout] 796 | ); [INFO] [stdout] 797 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> crates/printer/src/json.rs:791:25 [INFO] [stdout] | [INFO] [stdout] 791 | if let Some(ref path) = self.path { [INFO] [stdout] | ^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 791 - if let Some(ref path) = self.path { [INFO] [stdout] 791 + if let Some(path) = self.path { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> crates/printer/src/jsont.rs:237:5 [INFO] [stdout] | [INFO] [stdout] 237 | while let Some(chunk) = it.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for chunk in it.by_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> crates/printer/src/jsont.rs:244:22 [INFO] [stdout] | [INFO] [stdout] 244 | let index4 = (group24 >> 0) & 0b111_111; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider reducing it to: `group24` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> crates/printer/src/jsont.rs:250:5 [INFO] [stdout] | [INFO] [stdout] 250 | / match it.remainder() { [INFO] [stdout] 251 | | &[] => {} [INFO] [stdout] 252 | | &[byte0] => { [INFO] [stdout] 253 | | let group8 = usize::from(byte0); [INFO] [stdout] ... | [INFO] [stdout] 271 | | _ => unreachable!("remainder must have length < 3"), [INFO] [stdout] 272 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 250 ~ match *it.remainder() { [INFO] [stdout] 251 ~ [] => {} [INFO] [stdout] 252 ~ [byte0] => { [INFO] [stdout] 253 | let group8 = usize::from(byte0); [INFO] [stdout] ... [INFO] [stdout] 260 | } [INFO] [stdout] 261 ~ [byte0, byte1] => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PathPrinterBuilder` [INFO] [stdout] --> crates/printer/src/path.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 39 | / pub fn new() -> PathPrinterBuilder { [INFO] [stdout] 40 | | PathPrinterBuilder { config: Config::default() } [INFO] [stdout] 41 | | } [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 37 + impl Default for PathPrinterBuilder { [INFO] [stdout] 38 + fn default() -> Self { [INFO] [stdout] 39 + Self::new() [INFO] [stdout] 40 + } [INFO] [stdout] 41 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/printer/src/path.rs:138:5 [INFO] [stdout] | [INFO] [stdout] 138 | /// with the other printers in this crate. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 138 | /// with the other printers in this crate. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/printer/src/path.rs:140:5 [INFO] [stdout] | [INFO] [stdout] 140 | /// with the other printers in this crate. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 140 | /// with the other printers in this crate. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `as_ref` does nothing [INFO] [stdout] --> crates/printer/src/path.rs:151:38 [INFO] [stdout] | [INFO] [stdout] 151 | let ppath = PrinterPath::new(path.as_ref()) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] = note: `#[warn(clippy::useless_asref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `StandardBuilder` [INFO] [stdout] --> crates/printer/src/standard.rs:105:5 [INFO] [stdout] | [INFO] [stdout] 105 | / pub fn new() -> StandardBuilder { [INFO] [stdout] 106 | | StandardBuilder { config: Config::default() } [INFO] [stdout] 107 | | } [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 103 + impl Default for StandardBuilder { [INFO] [stdout] 104 + fn default() -> Self { [INFO] [stdout] 105 + Self::new() [INFO] [stdout] 106 + } [INFO] [stdout] 107 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/printer/src/standard.rs:631:5 [INFO] [stdout] | [INFO] [stdout] 631 | /// no file path is given, then this is `'static`. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 631 | /// no file path is given, then this is `'static`. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/printer/src/standard.rs:633:5 [INFO] [stdout] | [INFO] [stdout] 633 | /// borrows. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 633 | /// borrows. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/printer/src/standard.rs:635:5 [INFO] [stdout] | [INFO] [stdout] 635 | /// `grep_searcher::Searcher` that is reporting results to this sink. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 635 | /// `grep_searcher::Searcher` that is reporting results to this sink. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/printer/src/standard.rs:637:5 [INFO] [stdout] | [INFO] [stdout] 637 | /// output to. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 637 | /// output to. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/printer/src/standard.rs:784:9 [INFO] [stdout] | [INFO] [stdout] 784 | / if searcher.binary_detection().convert_byte().is_some() { [INFO] [stdout] 785 | | if self.binary_byte_offset.is_some() { [INFO] [stdout] 786 | | return Ok(false); [INFO] [stdout] 787 | | } [INFO] [stdout] 788 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 784 ~ if searcher.binary_detection().convert_byte().is_some() [INFO] [stdout] 785 ~ && self.binary_byte_offset.is_some() { [INFO] [stdout] 786 | return Ok(false); [INFO] [stdout] 787 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/printer/src/standard.rs:805:9 [INFO] [stdout] | [INFO] [stdout] 805 | / if searcher.binary_detection().convert_byte().is_some() { [INFO] [stdout] 806 | | if self.binary_byte_offset.is_some() { [INFO] [stdout] 807 | | return Ok(false); [INFO] [stdout] 808 | | } [INFO] [stdout] 809 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 805 ~ if searcher.binary_detection().convert_byte().is_some() [INFO] [stdout] 806 ~ && self.binary_byte_offset.is_some() { [INFO] [stdout] 807 | return Ok(false); [INFO] [stdout] 808 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/printer/src/standard.rs:828:9 [INFO] [stdout] | [INFO] [stdout] 828 | / if searcher.binary_detection().quit_byte().is_some() { [INFO] [stdout] 829 | | if let Some(ref path) = self.path { [INFO] [stdout] 830 | | log::debug!( [INFO] [stdout] 831 | | "ignoring {path}: found binary data at \ [INFO] [stdout] ... | [INFO] [stdout] 836 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 828 ~ if searcher.binary_detection().quit_byte().is_some() [INFO] [stdout] 829 ~ && let Some(ref path) = self.path { [INFO] [stdout] 830 | log::debug!( [INFO] [stdout] ... [INFO] [stdout] 834 | ); [INFO] [stdout] 835 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/printer/src/standard.rs:1524:30 [INFO] [stdout] | [INFO] [stdout] 1524 | trim_line_terminator(&self.searcher, buf, line); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.searcher` [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 `map_or` can be simplified [INFO] [stdout] --> crates/printer/src/standard.rs:1563:9 [INFO] [stdout] | [INFO] [stdout] 1563 | self.config().max_columns.map_or(false, |m| line.len() as u64 > m) [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] 1563 - self.config().max_columns.map_or(false, |m| line.len() as u64 > m) [INFO] [stdout] 1563 + self.config().max_columns.is_some_and(|m| line.len() as u64 > m) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SummaryBuilder` [INFO] [stdout] --> crates/printer/src/summary.rs:153:5 [INFO] [stdout] | [INFO] [stdout] 153 | / pub fn new() -> SummaryBuilder { [INFO] [stdout] 154 | | SummaryBuilder { config: Config::default() } [INFO] [stdout] 155 | | } [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 151 + impl Default for SummaryBuilder { [INFO] [stdout] 152 + fn default() -> Self { [INFO] [stdout] 153 + Self::new() [INFO] [stdout] 154 + } [INFO] [stdout] 155 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/printer/src/summary.rs:476:5 [INFO] [stdout] | [INFO] [stdout] 476 | /// no file path is given, then this is `'static`. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 476 | /// no file path is given, then this is `'static`. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/printer/src/summary.rs:478:5 [INFO] [stdout] | [INFO] [stdout] 478 | /// borrows. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 478 | /// borrows. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/printer/src/summary.rs:480:5 [INFO] [stdout] | [INFO] [stdout] 480 | /// `grep_searcher::Searcher` that is reporting results to this sink. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 480 | /// `grep_searcher::Searcher` that is reporting results to this sink. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/printer/src/summary.rs:482:5 [INFO] [stdout] | [INFO] [stdout] 482 | /// output to. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 482 | /// output to. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/printer/src/summary.rs:684:9 [INFO] [stdout] | [INFO] [stdout] 684 | / if searcher.binary_detection().quit_byte().is_some() { [INFO] [stdout] 685 | | if let Some(ref path) = self.path { [INFO] [stdout] 686 | | log::debug!( [INFO] [stdout] 687 | | "ignoring {path}: found binary data at \ [INFO] [stdout] ... | [INFO] [stdout] 692 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 684 ~ if searcher.binary_detection().quit_byte().is_some() [INFO] [stdout] 685 ~ && let Some(ref path) = self.path { [INFO] [stdout] 686 | log::debug!( [INFO] [stdout] ... [INFO] [stdout] 690 | ); [INFO] [stdout] 691 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> crates/printer/src/util.rs:51:31 [INFO] [stdout] | [INFO] [stdout] 51 | pub(crate) fn replace_all<'a>( [INFO] [stdout] | ^^ [INFO] [stdout] 52 | &'a mut self, [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] 51 ~ pub(crate) fn replace_all( [INFO] [stdout] 52 ~ &mut self, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> crates/printer/src/util.rs:61:62 [INFO] [stdout] | [INFO] [stdout] 61 | let is_multi_line = searcher.multi_line_with_matcher(&matcher); [INFO] [stdout] | ^^^^^^^^ help: change this to: `matcher` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> crates/printer/src/util.rs:115:31 [INFO] [stdout] | [INFO] [stdout] 115 | pub(crate) fn replacement<'a>( [INFO] [stdout] | ^^ [INFO] [stdout] 116 | &'a self, [INFO] [stdout] | ^^ [INFO] [stdout] 117 | ) -> Option<(&'a [u8], &'a [Match])> { [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] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 115 ~ pub(crate) fn replacement( [INFO] [stdout] 116 ~ &self, [INFO] [stdout] 117 ~ ) -> Option<(&[u8], &[Match])> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> crates/printer/src/util.rs:458:9 [INFO] [stdout] | [INFO] [stdout] 458 | / match b { [INFO] [stdout] 459 | | b'\t' | b'\n' | b'\x0B' | b'\x0C' | b'\r' | b' ' => true, [INFO] [stdout] 460 | | _ => false, [INFO] [stdout] 461 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 458 - match b { [INFO] [stdout] 459 - b'\t' | b'\n' | b'\x0B' | b'\x0C' | b'\r' | b' ' => true, [INFO] [stdout] 460 - _ => false, [INFO] [stdout] 461 - } [INFO] [stdout] 458 + matches!(b, b'\t' | b'\n' | b'\x0B' | b'\x0C' | b'\r' | b' ') [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> tests/macros.rs:6:30 [INFO] [stdout] | [INFO] [stdout] 6 | let (dir, cmd) = crate::util::setup(stringify!($name)); [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] = note: `#[warn(clippy::crate_in_macro_def)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> tests/hay.rs:1:22 [INFO] [stdout] | [INFO] [stdout] 1 | pub const SHERLOCK: &'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] --> tests/hay.rs:10:27 [INFO] [stdout] | [INFO] [stdout] 10 | pub const SHERLOCK_CRLF: &'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: statics have by default a `'static` lifetime [INFO] [stdout] --> tests/util.rs:14:19 [INFO] [stdout] | [INFO] [stdout] 14 | static TEST_DIR: &'static str = "ripgrep-tests"; [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] --> tests/binary.rs:24:13 [INFO] [stdout] | [INFO] [stdout] 24 | const HAY: &'static [u8] = include_bytes!("./data/sherlock-nul.txt"); [INFO] [stdout] | -^^^^^^^----- help: consider removing `'static`: `&[u8]` [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] --> tests/feature.rs:623:22 [INFO] [stdout] | [INFO] [stdout] 623 | const SHERLOCK: &'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] --> tests/feature.rs:649:22 [INFO] [stdout] | [INFO] [stdout] 649 | const SHERLOCK: &'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: struct `DirectoryCache` is never constructed [INFO] [stdout] --> crates/core/cache.rs:23:19 [INFO] [stdout] | [INFO] [stdout] 23 | pub(crate) struct DirectoryCache { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `canonicalize_key`, `get`, `insert`, and `cleanup` are never used [INFO] [stdout] --> crates/core/cache.rs:30:19 [INFO] [stdout] | [INFO] [stdout] 28 | impl DirectoryCache { [INFO] [stdout] | ------------------- associated items in this implementation [INFO] [stdout] 29 | /// Create a new directory cache with 5-second TTL. [INFO] [stdout] 30 | pub(crate) fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 38 | fn canonicalize_key(dir: &Path) -> PathBuf { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 44 | pub(crate) fn get(&self, dir: &Path) -> Option>> { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 55 | pub(crate) fn insert(&mut self, dir: PathBuf, entries: Vec) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 61 | pub(crate) fn cleanup(&mut self) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CachedResult` is never constructed [INFO] [stdout] --> crates/core/cache.rs:75:19 [INFO] [stdout] | [INFO] [stdout] 75 | pub(crate) struct CachedResult { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SearchResultCache` is never constructed [INFO] [stdout] --> crates/core/cache.rs:89:19 [INFO] [stdout] | [INFO] [stdout] 89 | pub(crate) struct SearchResultCache { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `is_valid`, `get`, `update`, and `clear` are never used [INFO] [stdout] --> crates/core/cache.rs:98:19 [INFO] [stdout] | [INFO] [stdout] 96 | impl SearchResultCache { [INFO] [stdout] | ---------------------- associated items in this implementation [INFO] [stdout] 97 | /// Create a new search result cache. [INFO] [stdout] 98 | pub(crate) fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 111 | pub(crate) fn is_valid(&self, pattern: &str) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 122 | pub(crate) fn get(&self, pattern: &str) -> Option> { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 131 | pub(crate) fn update(&mut self, pattern: String, results: Vec) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 138 | pub(crate) fn clear(&mut self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `new` and `unlimited` are never used [INFO] [stdout] --> crates/core/cache.rs:164:19 [INFO] [stdout] | [INFO] [stdout] 162 | impl BoundedSearch { [INFO] [stdout] | ------------------ associated functions in this implementation [INFO] [stdout] 163 | /// Create bounded search with custom limits. [INFO] [stdout] 164 | pub(crate) fn new(max_results: usize) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 182 | pub(crate) fn unlimited() -> Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `wsl2_optimized` is never read [INFO] [stdout] --> crates/core/flags/hiargs.rs:58:16 [INFO] [stdout] | [INFO] [stdout] 36 | pub(crate) struct HiArgs { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] ... [INFO] [stdout] 58 | pub(crate) wsl2_optimized: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `HiArgs` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `exact_match`, `case_sensitive`, `word_boundary`, `fuzzy_match`, `substring_match`, and `length_similarity` are never read [INFO] [stdout] --> crates/core/heuristic.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 15 | pub(crate) struct ScoringWeights { [INFO] [stdout] | -------------- fields in this struct [INFO] [stdout] 16 | /// Weight for exact matches. Default: 1.0 [INFO] [stdout] 17 | pub exact_match: f32, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 18 | /// Weight for case-sensitive matches. Default: 0.5 [INFO] [stdout] 19 | pub case_sensitive: f32, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 20 | /// Weight for word boundary matches. Default: 0.3 [INFO] [stdout] 21 | pub word_boundary: f32, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 22 | /// Weight for fuzzy/consecutive matches. Default: 0.2 [INFO] [stdout] 23 | pub fuzzy_match: f32, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 24 | /// Weight for substring matches. Default: 0.15 [INFO] [stdout] 25 | pub substring_match: f32, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 26 | /// Weight for length similarity. Default: 0.1 [INFO] [stdout] 27 | pub length_similarity: f32, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ScoringWeights` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `normalize` are never used [INFO] [stdout] --> crates/core/heuristic.rs:45:19 [INFO] [stdout] | [INFO] [stdout] 43 | impl ScoringWeights { [INFO] [stdout] | ------------------- associated items in this implementation [INFO] [stdout] 44 | /// Creates custom weights for domain-specific scoring. [INFO] [stdout] 45 | pub(crate) fn new( [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 64 | pub(crate) fn normalize(&self) -> Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `fuzzy_threshold`, `max_edit_distance`, `unicode_aware`, `case_sensitive_substring`, `consecutive_match_bonus`, and `weights` are never read [INFO] [stdout] --> crates/core/heuristic.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 89 | pub(crate) struct HeuristicConfig { [INFO] [stdout] | --------------- fields in this struct [INFO] [stdout] 90 | /// Minimum fuzzy match threshold (0.0-1.0). Default: 0.6 (60%) [INFO] [stdout] 91 | pub fuzzy_threshold: f32, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 92 | /// Maximum edit distance for close matches. If None, uses pattern.len() / 4 [INFO] [stdout] 93 | pub max_edit_distance: Option, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] 94 | /// Whether to use Unicode-aware word boundaries. Default: true [INFO] [stdout] 95 | pub unicode_aware: bool, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 96 | /// Whether to require case-sensitive substring matching. Default: false [INFO] [stdout] 97 | pub case_sensitive_substring: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 98 | /// Bonus multiplier for consecutive character matches. Default: 1.0 [INFO] [stdout] 99 | pub consecutive_match_bonus: f32, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 100 | /// Custom scoring weights. Default: standard weights [INFO] [stdout] 101 | pub weights: ScoringWeights, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `HeuristicConfig` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `new` and `with_weights` are never used [INFO] [stdout] --> crates/core/heuristic.rs:106:19 [INFO] [stdout] | [INFO] [stdout] 104 | impl HeuristicConfig { [INFO] [stdout] | -------------------- associated functions in this implementation [INFO] [stdout] 105 | /// Creates a new configuration with custom settings. [INFO] [stdout] 106 | pub(crate) fn new( [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 124 | pub(crate) fn with_weights( [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ScoredMatch` is never constructed [INFO] [stdout] --> crates/core/heuristic.rs:158:19 [INFO] [stdout] | [INFO] [stdout] 158 | pub(crate) struct ScoredMatch { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ScoreBreakdown` is never constructed [INFO] [stdout] --> crates/core/heuristic.rs:181:19 [INFO] [stdout] | [INFO] [stdout] 181 | pub(crate) struct ScoreBreakdown { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `calculate_relevance_score` is never used [INFO] [stdout] --> crates/core/heuristic.rs:201:15 [INFO] [stdout] | [INFO] [stdout] 201 | pub(crate) fn calculate_relevance_score( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `calculate_relevance_score_with_config` is never used [INFO] [stdout] --> crates/core/heuristic.rs:217:15 [INFO] [stdout] | [INFO] [stdout] 217 | pub(crate) fn calculate_relevance_score_with_config( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `calculate_relevance_score_breakdown` is never used [INFO] [stdout] --> crates/core/heuristic.rs:271:15 [INFO] [stdout] | [INFO] [stdout] 271 | pub(crate) fn calculate_relevance_score_breakdown( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_word_boundary_match` is never used [INFO] [stdout] --> crates/core/heuristic.rs:329:4 [INFO] [stdout] | [INFO] [stdout] 329 | fn is_word_boundary_match(pattern: &str, text: &str, unicode_aware: bool) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_substring_match` is never used [INFO] [stdout] --> crates/core/heuristic.rs:362:4 [INFO] [stdout] | [INFO] [stdout] 362 | fn is_substring_match(pattern: &str, text: &str, case_sensitive: bool) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_consecutive_matches` is never used [INFO] [stdout] --> crates/core/heuristic.rs:373:4 [INFO] [stdout] | [INFO] [stdout] 373 | fn count_consecutive_matches(pattern: &str, text: &str) -> (usize, bool) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `calculate_length_similarity` is never used [INFO] [stdout] --> crates/core/heuristic.rs:405:4 [INFO] [stdout] | [INFO] [stdout] 405 | fn calculate_length_similarity(pattern: &str, text: &str) -> f32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `fuzzy_match_with_threshold` is never used [INFO] [stdout] --> crates/core/heuristic.rs:420:4 [INFO] [stdout] | [INFO] [stdout] 420 | fn fuzzy_match_with_threshold(pattern: &str, text: &str, threshold: f32) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `fuzzy_match` is never used [INFO] [stdout] --> crates/core/heuristic.rs:445:15 [INFO] [stdout] | [INFO] [stdout] 445 | pub(crate) fn fuzzy_match(pattern: &str, text: &str) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `levenshtein_distance` is never used [INFO] [stdout] --> crates/core/heuristic.rs:453:15 [INFO] [stdout] | [INFO] [stdout] 453 | pub(crate) fn levenshtein_distance(s1: &str, s2: &str) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_close_match` is never used [INFO] [stdout] --> crates/core/heuristic.rs:500:15 [INFO] [stdout] | [INFO] [stdout] 500 | pub(crate) fn is_close_match(pattern: &str, text: &str, max_distance: Option) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `rank_candidates` is never used [INFO] [stdout] --> crates/core/heuristic.rs:507:15 [INFO] [stdout] | [INFO] [stdout] 507 | pub(crate) fn rank_candidates( [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `find_match_positions` is never used [INFO] [stdout] --> crates/core/heuristic.rs:537:15 [INFO] [stdout] | [INFO] [stdout] 537 | pub(crate) fn find_match_positions(pattern: &str, text: &str) -> Vec<(usize, usize)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `highlight_matches` is never used [INFO] [stdout] --> crates/core/heuristic.rs:556:15 [INFO] [stdout] | [INFO] [stdout] 556 | pub(crate) fn highlight_matches( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `IncrementalResult` is never constructed [INFO] [stdout] --> crates/core/incremental.rs:32:19 [INFO] [stdout] | [INFO] [stdout] 32 | pub(crate) struct IncrementalResult { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `IncrementalSearch` is never constructed [INFO] [stdout] --> crates/core/incremental.rs:48:19 [INFO] [stdout] | [INFO] [stdout] 48 | pub(crate) struct IncrementalSearch { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> crates/core/incremental.rs:61:19 [INFO] [stdout] | [INFO] [stdout] 59 | impl IncrementalSearch { [INFO] [stdout] | ---------------------- associated items in this implementation [INFO] [stdout] 60 | /// Create a new incremental search engine. [INFO] [stdout] 61 | pub(crate) fn new(max_results: usize) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 73 | pub(crate) fn can_reuse(&self, new_pattern: &str) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 109 | pub(crate) fn filter_results( [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 143 | pub(crate) fn update( [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 159 | pub(crate) fn get_cached(&self) -> Option<&[IncrementalResult]> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 168 | pub(crate) fn clear(&mut self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 175 | pub(crate) fn stats(&self) -> (usize, usize) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `incremental_score` is never used [INFO] [stdout] --> crates/core/incremental.rs:189:15 [INFO] [stdout] | [INFO] [stdout] 189 | pub(crate) fn incremental_score(pattern: &str, text: &str) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PatternCache` is never constructed [INFO] [stdout] --> crates/core/optimizer.rs:19:19 [INFO] [stdout] | [INFO] [stdout] 19 | pub(crate) struct PatternCache { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `is_cached`, `add`, `clear`, and `len` are never used [INFO] [stdout] --> crates/core/optimizer.rs:26:19 [INFO] [stdout] | [INFO] [stdout] 24 | impl PatternCache { [INFO] [stdout] | ----------------- associated items in this implementation [INFO] [stdout] 25 | /// Create a new pattern cache with size limit. [INFO] [stdout] 26 | pub(crate) fn new(max_size: usize) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 36 | pub(crate) fn is_cached(&self, pattern: &str) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 42 | pub(crate) fn add(&mut self, pattern: String) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 54 | pub(crate) fn clear(&mut self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 60 | pub(crate) fn len(&self) -> usize { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `FileContentCache` is never constructed [INFO] [stdout] --> crates/core/optimizer.rs:76:19 [INFO] [stdout] | [INFO] [stdout] 76 | pub(crate) struct FileContentCache { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `get`, `insert`, `clear`, and `stats` are never used [INFO] [stdout] --> crates/core/optimizer.rs:85:19 [INFO] [stdout] | [INFO] [stdout] 83 | impl FileContentCache { [INFO] [stdout] | --------------------- associated items in this implementation [INFO] [stdout] 84 | /// Create a new file content cache with size limit (in bytes). [INFO] [stdout] 85 | pub(crate) fn new(max_size_bytes: usize) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 97 | pub(crate) fn get(&self, path: &Path) -> Option> { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 103 | pub(crate) fn insert(&mut self, path: std::path::PathBuf, content: Vec) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 128 | pub(crate) fn clear(&mut self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 136 | pub(crate) fn stats(&self) -> (usize, usize) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PathFilter` is never constructed [INFO] [stdout] --> crates/core/optimizer.rs:151:19 [INFO] [stdout] | [INFO] [stdout] 151 | pub(crate) struct PathFilter { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `default_filter`, `should_skip`, `bytes_contains`, and `is_binary` are never used [INFO] [stdout] --> crates/core/optimizer.rs:162:19 [INFO] [stdout] | [INFO] [stdout] 160 | impl PathFilter { [INFO] [stdout] | --------------- associated items in this implementation [INFO] [stdout] 161 | /// Create filter with sensible defaults. [INFO] [stdout] 162 | pub(crate) fn default_filter() -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 183 | pub(crate) fn should_skip(&self, path: &Path) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 205 | fn bytes_contains(haystack: &[u8], needle: &[u8]) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 219 | pub(crate) fn is_binary(&self, content: &[u8]) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `as_str` is never used [INFO] [stdout] --> crates/core/ripgrep_config.rs:38:19 [INFO] [stdout] | [INFO] [stdout] 27 | impl SearchMode { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 38 | pub(crate) fn as_str(&self) -> &'static str { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `save` and `to_toml` are never used [INFO] [stdout] --> crates/core/ripgrep_config.rs:172:19 [INFO] [stdout] | [INFO] [stdout] 123 | impl RipgrepConfig { [INFO] [stdout] | ------------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 172 | pub(crate) fn save(&self) -> Result<()> { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 290 | fn to_toml(&self) -> String { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SimdMatcher` is never constructed [INFO] [stdout] --> crates/core/simd.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 14 | pub struct SimdMatcher; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `new`, `find_all`, `find_single_byte`, and `find_scalar` are never used [INFO] [stdout] --> crates/core/simd.rs:18:12 [INFO] [stdout] | [INFO] [stdout] 16 | impl SimdMatcher { [INFO] [stdout] | ---------------- associated functions in this implementation [INFO] [stdout] 17 | /// Create a new SIMD matcher [INFO] [stdout] 18 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 24 | pub fn find_all(pattern: &[u8], text: &[u8]) -> Vec { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 40 | fn find_single_byte(byte: u8, text: &[u8]) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 54 | fn find_scalar(pattern: &[u8], text: &[u8]) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SimdCaseInsensitiveMatcher` is never constructed [INFO] [stdout] --> crates/core/simd.rs:74:12 [INFO] [stdout] | [INFO] [stdout] 74 | pub struct SimdCaseInsensitiveMatcher; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `new` and `find_all` are never used [INFO] [stdout] --> crates/core/simd.rs:78:12 [INFO] [stdout] | [INFO] [stdout] 76 | impl SimdCaseInsensitiveMatcher { [INFO] [stdout] | ------------------------------- associated functions in this implementation [INFO] [stdout] 77 | /// Create a new case-insensitive SIMD matcher [INFO] [stdout] 78 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 83 | pub fn find_all(pattern: &[u8], text: &[u8]) -> Vec { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/core/flags/complete/fish.rs:26:32 [INFO] [stdout] | [INFO] [stdout] 26 | .replace("!LONG!", &long) [INFO] [stdout] | ^^^^^ help: change this to: `long` [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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> crates/core/flags/complete/fish.rs:44:17 [INFO] [stdout] | [INFO] [stdout] 44 | completion.push_str("'"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `completion.push('\'')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> crates/core/flags/complete/fish.rs:49:17 [INFO] [stdout] | [INFO] [stdout] 49 | completion.push_str("'"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `completion.push('\'')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/core/flags/complete/fish.rs:67:43 [INFO] [stdout] | [INFO] [stdout] 67 | .replace("!NEGATED!", &negated) [INFO] [stdout] | ^^^^^^^^ help: change this to: `negated` [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] --> crates/core/flags/complete/fish.rs:69:40 [INFO] [stdout] | [INFO] [stdout] 69 | .replace("!LONG!", &long) [INFO] [stdout] | ^^^^^ help: change this to: `long` [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] --> crates/core/flags/complete/powershell.rs:57:36 [INFO] [stdout] | [INFO] [stdout] 57 | .replace("!NAME!", &name) [INFO] [stdout] | ^^^^^ help: change this to: `name` [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] --> crates/core/flags/complete/powershell.rs:79:40 [INFO] [stdout] | [INFO] [stdout] 79 | .replace("!NAME!", &negated) [INFO] [stdout] | ^^^^^^^^ help: change this to: `negated` [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: doc list item without indentation [INFO] [stdout] --> crates/core/flags/complete/zsh.rs:9:1 [INFO] [stdout] | [INFO] [stdout] 9 | Namely, the zsh completions take application level context about flag [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 9 | Namely, the zsh completions take application level context about flag [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/core/flags/complete/zsh.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | compatibility into account. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 10 | compatibility into account. [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/core/flags/complete/zsh.rs:12:1 [INFO] [stdout] | [INFO] [stdout] 12 | isn't included in the zsh completions. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 12 | isn't included in the zsh completions. [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/core/flags/complete/zsh.rs:14:1 [INFO] [stdout] | [INFO] [stdout] 14 | works and how it can be extended. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 14 | works and how it can be extended. [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> crates/core/flags/config.rs:61:31 [INFO] [stdout] | [INFO] [stdout] 61 | match std::fs::File::open(&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_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> crates/core/flags/defs.rs:2453:12 [INFO] [stdout] | [INFO] [stdout] 2453 | if threshold < 0.0 || threshold > 1.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(0.0..=1.0).contains(&threshold)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/core/flags/defs.rs:3230:9 [INFO] [stdout] | [INFO] [stdout] 3230 | &*BORROWED [INFO] [stdout] | ^^^^^^^^^^ help: try: `&BORROWED` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `JSON` contains a capitalized acronym [INFO] [stdout] --> crates/core/flags/defs.rs:3628:8 [INFO] [stdout] | [INFO] [stdout] 3628 | struct JSON; [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Json` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/core/flags/doc/help.rs:118:34 [INFO] [stdout] | [INFO] [stdout] 118 | generate_long_flag(flag, &mut cat); [INFO] [stdout] | ^^^^^^^^ help: change this to: `cat` [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] --> crates/core/flags/doc/help.rs:229:28 [INFO] [stdout] | [INFO] [stdout] 229 | lines.push(format!("{item_label}")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `item_label.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: useless use of `format!` [INFO] [stdout] --> crates/core/flags/doc/help.rs:236:28 [INFO] [stdout] | [INFO] [stdout] 236 | lines.push(format!("{pieces}")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `pieces.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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/core/flags/doc/man.rs:34:29 [INFO] [stdout] | [INFO] [stdout] 34 | generate_flag(flag, &mut cat); [INFO] [stdout] | ^^^^^^^^ help: change this to: `cat` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> crates/core/flags/hiargs.rs:130:9 [INFO] [stdout] | [INFO] [stdout] 130 | / match low.mode { [INFO] [stdout] 131 | | Mode::Search(ref mut mode) => match *mode { [INFO] [stdout] 132 | | // treat `-v --count-matches` as `-v --count` [INFO] [stdout] 133 | | SearchMode::CountMatches if low.invert_match => { [INFO] [stdout] ... | [INFO] [stdout] 142 | | _ => {} [INFO] [stdout] 143 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 130 ~ if let Mode::Search(ref mut mode) = low.mode { match *mode { [INFO] [stdout] 131 + // treat `-v --count-matches` as `-v --count` [INFO] [stdout] 132 + SearchMode::CountMatches if low.invert_match => { [INFO] [stdout] 133 + *mode = SearchMode::Count; [INFO] [stdout] 134 + } [INFO] [stdout] 135 + // treat `-o --count` as `--count-matches` [INFO] [stdout] 136 + SearchMode::Count if low.only_matching => { [INFO] [stdout] 137 + *mode = SearchMode::CountMatches; [INFO] [stdout] 138 + } [INFO] [stdout] 139 + _ => {} [INFO] [stdout] 140 + } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> crates/core/flags/hiargs.rs:179:29 [INFO] [stdout] | [INFO] [stdout] 179 | let with_filename = low [INFO] [stdout] | _____________________________^ [INFO] [stdout] 180 | | .with_filename [INFO] [stdout] 181 | | .unwrap_or_else(|| low.vimgrep || !paths.is_one_file); [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 `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 181 - .unwrap_or_else(|| low.vimgrep || !paths.is_one_file); [INFO] [stdout] 181 + .unwrap_or(low.vimgrep || !paths.is_one_file); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/core/flags/hiargs.rs:210:47 [INFO] [stdout] | [INFO] [stdout] 210 | | SearchMode::CountMatches => return false, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 210 - | SearchMode::CountMatches => return false, [INFO] [stdout] 210 + | SearchMode::CountMatches => false, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/core/flags/hiargs.rs:211:37 [INFO] [stdout] | [INFO] [stdout] 211 | SearchMode::JSON => return true, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 211 - SearchMode::JSON => return true, [INFO] [stdout] 211 + SearchMode::JSON => true, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/core/flags/hiargs.rs:212:38 [INFO] [stdout] | [INFO] [stdout] 212 | SearchMode::Fluid => return true, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 212 - SearchMode::Fluid => return true, [INFO] [stdout] 212 + SearchMode::Fluid => true, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> crates/core/messages.rs:73:12 [INFO] [stdout] | [INFO] [stdout] 73 | if crate::messages::messages() { [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] = note: `#[warn(clippy::crate_in_macro_def)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> crates/core/messages.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | crate::messages::set_errored(); [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> crates/core/messages.rs:94:12 [INFO] [stdout] | [INFO] [stdout] 94 | if crate::messages::messages() && crate::messages::ignore_messages() { [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> crates/core/flags/hiargs.rs:559:24 [INFO] [stdout] | [INFO] [stdout] 559 | .separator(self.path_separator.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.path_separator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> crates/core/flags/complete/mod.rs:5:20 [INFO] [stdout] | [INFO] [stdout] 5 | static ENCODINGS: &'static str = include_str!("encodings.sh"); [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] --> crates/core/flags/complete/bash.rs:7:23 [INFO] [stdout] | [INFO] [stdout] 7 | const TEMPLATE_FULL: &'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] --> crates/core/flags/complete/bash.rs:45:23 [INFO] [stdout] | [INFO] [stdout] 45 | const TEMPLATE_CASE: &'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] --> crates/core/flags/complete/bash.rs:52:31 [INFO] [stdout] | [INFO] [stdout] 52 | const TEMPLATE_CASE_CHOICES: &'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: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> crates/core/flags/hiargs.rs:631:30 [INFO] [stdout] | [INFO] [stdout] 631 | .path_terminator(self.path_terminator.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.path_terminator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> crates/core/flags/complete/fish.rs:7:18 [INFO] [stdout] | [INFO] [stdout] 7 | const TEMPLATE: &'static str = "complete -c rg !SHORT! -l !LONG! -d '!DOC!'"; [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] --> crates/core/flags/complete/fish.rs:8:26 [INFO] [stdout] | [INFO] [stdout] 8 | const TEMPLATE_NEGATED: &'static str = "complete -c rg -l !NEGATED! -n '__rg_contains_opt !LONG! !SHORT!' -d '!DOC!'\n"; [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] --> crates/core/flags/complete/powershell.rs:7:18 [INFO] [stdout] | [INFO] [stdout] 7 | const TEMPLATE: &'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: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> crates/core/flags/hiargs.rs:642:29 [INFO] [stdout] | [INFO] [stdout] 642 | .separator_path(self.path_separator.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.path_separator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> crates/core/flags/hiargs.rs:669:30 [INFO] [stdout] | [INFO] [stdout] 669 | .path_terminator(self.path_terminator.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.path_terminator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> crates/core/flags/complete/powershell.rs:37:23 [INFO] [stdout] | [INFO] [stdout] 37 | const TEMPLATE_FLAG: &'static str = "[CompletionResult]::new('!DASH_NAME!', '!NAME!', [CompletionResultType]::ParameterName, '!DOC!')"; [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: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> crates/core/flags/hiargs.rs:671:29 [INFO] [stdout] | [INFO] [stdout] 671 | .separator_path(self.path_separator.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.path_separator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> crates/core/flags/hiargs.rs:794:36 [INFO] [stdout] | [INFO] [stdout] 794 | haystacks.sort_by(|ref h1, ref h2| { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 794 - haystacks.sort_by(|ref h1, ref h2| { [INFO] [stdout] 794 + haystacks.sort_by(|h1, ref h2| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> crates/core/flags/hiargs.rs:794:44 [INFO] [stdout] | [INFO] [stdout] 794 | haystacks.sort_by(|ref h1, ref h2| { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 794 - haystacks.sort_by(|ref h1, ref h2| { [INFO] [stdout] 794 + haystacks.sort_by(|ref h1, h2| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/core/flags/hiargs.rs:1238:21 [INFO] [stdout] | [INFO] [stdout] 1238 | builder.add(&glob)?; [INFO] [stdout] | ^^^^^ help: change this to: `glob` [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: name `JSON` contains a capitalized acronym [INFO] [stdout] --> crates/core/flags/lowargs.rs:215:5 [INFO] [stdout] | [INFO] [stdout] 215 | JSON, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Json` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> crates/core/flags/lowargs.rs:258:1 [INFO] [stdout] | [INFO] [stdout] 258 | / impl Default for BinaryMode { [INFO] [stdout] 259 | | fn default() -> BinaryMode { [INFO] [stdout] 260 | | BinaryMode::Auto [INFO] [stdout] 261 | | } [INFO] [stdout] 262 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 237 + #[derive(Default)] [INFO] [stdout] 238 | pub(crate) enum BinaryMode { [INFO] [stdout] 239 | /// Automatically determine the binary mode to use. Essentially, when [INFO] [stdout] ... [INFO] [stdout] 243 | /// a file is classified as binary, searching will immediately stop. [INFO] [stdout] 244 ~ #[default] [INFO] [stdout] 245 ~ Auto, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> crates/core/flags/lowargs.rs:294:1 [INFO] [stdout] | [INFO] [stdout] 294 | / impl Default for BufferMode { [INFO] [stdout] 295 | | fn default() -> BufferMode { [INFO] [stdout] 296 | | BufferMode::Auto [INFO] [stdout] 297 | | } [INFO] [stdout] 298 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 277 + #[derive(Default)] [INFO] [stdout] 278 | pub(crate) enum BufferMode { [INFO] [stdout] 279 | /// Select the buffer mode, 'line' or 'block', automatically based on [INFO] [stdout] 280 | /// whether stdout is connected to a tty. [INFO] [stdout] 281 ~ #[default] [INFO] [stdout] 282 ~ Auto, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> crates/core/flags/lowargs.rs:315:1 [INFO] [stdout] | [INFO] [stdout] 315 | / impl Default for CaseMode { [INFO] [stdout] 316 | | fn default() -> CaseMode { [INFO] [stdout] 317 | | CaseMode::Sensitive [INFO] [stdout] 318 | | } [INFO] [stdout] 319 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 304 + #[derive(Default)] [INFO] [stdout] 305 | pub(crate) enum CaseMode { [INFO] [stdout] 306 | /// Patterns are matched case sensitively. i.e., `a` does not match `A`. [INFO] [stdout] 307 ~ #[default] [INFO] [stdout] 308 ~ Sensitive, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> crates/core/flags/lowargs.rs:342:1 [INFO] [stdout] | [INFO] [stdout] 342 | / impl Default for ColorChoice { [INFO] [stdout] 343 | | fn default() -> ColorChoice { [INFO] [stdout] 344 | | ColorChoice::Auto [INFO] [stdout] 345 | | } [INFO] [stdout] 346 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 325 + #[derive(Default)] [INFO] [stdout] 326 | pub(crate) enum ColorChoice { [INFO] [stdout] 327 | /// Color and hyperlinks will never be used. [INFO] [stdout] ... [INFO] [stdout] 330 | /// tty. [INFO] [stdout] 331 ~ #[default] [INFO] [stdout] 332 ~ Auto, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> crates/core/flags/lowargs.rs:548:1 [INFO] [stdout] | [INFO] [stdout] 548 | / impl Default for EncodingMode { [INFO] [stdout] 549 | | fn default() -> EncodingMode { [INFO] [stdout] 550 | | EncodingMode::Auto [INFO] [stdout] 551 | | } [INFO] [stdout] 552 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 537 + #[derive(Default)] [INFO] [stdout] 538 | pub(crate) enum EncodingMode { [INFO] [stdout] 539 | /// Use only BOM sniffing to auto-detect an encoding. [INFO] [stdout] 540 ~ #[default] [INFO] [stdout] 541 ~ Auto, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> crates/core/flags/lowargs.rs:573:1 [INFO] [stdout] | [INFO] [stdout] 573 | / impl Default for EngineChoice { [INFO] [stdout] 574 | | fn default() -> EngineChoice { [INFO] [stdout] 575 | | EngineChoice::Default [INFO] [stdout] 576 | | } [INFO] [stdout] 577 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 558 + #[derive(Default)] [INFO] [stdout] 559 | pub(crate) enum EngineChoice { [INFO] [stdout] 560 | /// Uses the default regex engine: Rust's `regex` crate. [INFO] [stdout] ... [INFO] [stdout] 563 | /// the implementation of the `regex` crate.) [INFO] [stdout] 564 ~ #[default] [INFO] [stdout] 565 ~ Default, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> crates/core/flags/lowargs.rs:673:1 [INFO] [stdout] | [INFO] [stdout] 673 | / impl Default for MmapMode { [INFO] [stdout] 674 | | fn default() -> MmapMode { [INFO] [stdout] 675 | | MmapMode::Auto [INFO] [stdout] 676 | | } [INFO] [stdout] 677 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 659 + #[derive(Default)] [INFO] [stdout] 660 | pub(crate) enum MmapMode { [INFO] [stdout] 661 | /// This instructs ripgrep to use heuristics for selecting when to and not [INFO] [stdout] 662 | /// to use memory maps for searching. [INFO] [stdout] 663 ~ #[default] [INFO] [stdout] 664 ~ Auto, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> crates/core/flags/doc/help.rs:13:24 [INFO] [stdout] | [INFO] [stdout] 13 | const TEMPLATE_SHORT: &'static str = include_str!("template.short.help"); [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] --> crates/core/flags/doc/help.rs:14:23 [INFO] [stdout] | [INFO] [stdout] 14 | const TEMPLATE_LONG: &'static str = include_str!("template.long.help"); [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: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> crates/core/flags/parse.rs:107:36 [INFO] [stdout] | [INFO] [stdout] 107 | if let Err(err) = parser.parse(final_args.into_iter(), &mut low) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> crates/core/flags/parse.rs:223:12 [INFO] [stdout] | [INFO] [stdout] 223 | I: IntoIterator, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 107 - if let Err(err) = parser.parse(final_args.into_iter(), &mut low) { [INFO] [stdout] 107 + if let Err(err) = parser.parse(final_args, &mut low) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> crates/core/flags/doc/man.rs:9:18 [INFO] [stdout] | [INFO] [stdout] 9 | const TEMPLATE: &'static str = include_str!("template.rg.1"); [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: redundant guard [INFO] [stdout] --> crates/core/flags/parse.rs:233:43 [INFO] [stdout] | [INFO] [stdout] 233 | lexopt::Arg::Short(ch) if ch == 'h' => { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] = note: `#[warn(clippy::redundant_guards)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 233 - lexopt::Arg::Short(ch) if ch == 'h' => { [INFO] [stdout] 233 + lexopt::Arg::Short('h') => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> crates/core/flags/parse.rs:239:43 [INFO] [stdout] | [INFO] [stdout] 239 | lexopt::Arg::Short(ch) if ch == 'V' => { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 239 - lexopt::Arg::Short(ch) if ch == 'V' => { [INFO] [stdout] 239 + lexopt::Arg::Short('V') => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> crates/core/flags/parse.rs:246:44 [INFO] [stdout] | [INFO] [stdout] 246 | lexopt::Arg::Long(name) if name == "help" => { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 246 - lexopt::Arg::Long(name) if name == "help" => { [INFO] [stdout] 246 + lexopt::Arg::Long("help") => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> crates/core/flags/parse.rs:252:44 [INFO] [stdout] | [INFO] [stdout] 252 | lexopt::Arg::Long(name) if name == "version" => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 252 - lexopt::Arg::Long(name) if name == "version" => { [INFO] [stdout] 252 + lexopt::Arg::Long("version") => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/core/haystack.rs:158:9 [INFO] [stdout] | [INFO] [stdout] 158 | self.dent.file_type().map_or(false, |ft| ft.is_file()) [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] 158 - self.dent.file_type().map_or(false, |ft| ft.is_file()) [INFO] [stdout] 158 + self.dent.file_type().is_some_and(|ft| ft.is_file()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> crates/core/logger.rs:19:16 [INFO] [stdout] | [INFO] [stdout] 19 | const LOGGER: &'static Logger = &Logger(()); [INFO] [stdout] | -^^^^^^^------- help: consider removing `'static`: `&Logger` [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: unused import: `Path` [INFO] [stdout] --> crates/core/ripgrep_config.rs:15:17 [INFO] [stdout] | [INFO] [stdout] 15 | use std::path::{Path, PathBuf}; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/core/heuristic.rs:334:14 [INFO] [stdout] | [INFO] [stdout] 334 | !text[..pos] [INFO] [stdout] | ______________^ [INFO] [stdout] 335 | | .chars() [INFO] [stdout] 336 | | .last() [INFO] [stdout] 337 | | .map_or(false, |c| c.is_alphanumeric()) [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] 337 - .map_or(false, |c| c.is_alphanumeric()) [INFO] [stdout] 337 + .is_some_and(|c| c.is_alphanumeric()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/core/heuristic.rs:346:14 [INFO] [stdout] | [INFO] [stdout] 346 | !text[after_pos..] [INFO] [stdout] | ______________^ [INFO] [stdout] 347 | | .chars() [INFO] [stdout] 348 | | .next() [INFO] [stdout] 349 | | .map_or(false, |c| c.is_alphanumeric()) [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] 349 - .map_or(false, |c| c.is_alphanumeric()) [INFO] [stdout] 349 + .is_some_and(|c| c.is_alphanumeric()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> crates/core/simd.rs:11:1 [INFO] [stdout] | [INFO] [stdout] 11 | use memchr; [INFO] [stdout] | ^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> crates/core/incremental.rs:136:13 [INFO] [stdout] | [INFO] [stdout] 136 | results.sort_by(|a, b| b.score.cmp(&a.score)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 136 - results.sort_by(|a, b| b.score.cmp(&a.score)); [INFO] [stdout] 136 + results.sort_by_key(|b| std::cmp::Reverse(b.score)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> crates/core/ripgrep_config.rs:46:1 [INFO] [stdout] | [INFO] [stdout] 46 | / impl Default for SearchMode { [INFO] [stdout] 47 | | fn default() -> Self { [INFO] [stdout] 48 | | SearchMode::Fluid [INFO] [stdout] 49 | | } [INFO] [stdout] 50 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 22 + #[derive(Default)] [INFO] [stdout] 23 | pub(crate) enum SearchMode { [INFO] [stdout] 24 | Original, [INFO] [stdout] 25 ~ #[default] [INFO] [stdout] 26 ~ Fluid, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/core/ripgrep_config.rs:211:17 [INFO] [stdout] | [INFO] [stdout] 211 | &line[..pos].trim() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `line[..pos].trim()` [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: name `JSON` contains a capitalized acronym [INFO] [stdout] --> crates/core/search.rs:210:5 [INFO] [stdout] | [INFO] [stdout] 210 | JSON(grep::printer::JSON), [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Json` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/core/search.rs:285:12 [INFO] [stdout] | [INFO] [stdout] 285 | if !self.config.preprocessor.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.config.preprocessor.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: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/core/search.rs:303:28 [INFO] [stdout] | [INFO] [stdout] 303 | .ok_or_else(|| io::Error::new( [INFO] [stdout] | ____________________________^ [INFO] [stdout] 304 | | io::ErrorKind::Other, [INFO] [stdout] 305 | | "preprocessor not configured", [INFO] [stdout] 306 | | ))?; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 303 ~ .ok_or_else(|| io::Error::other( [INFO] [stdout] 304 ~ "preprocessor not configured", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/core/search.rs:311:13 [INFO] [stdout] | [INFO] [stdout] 311 | / io::Error::new( [INFO] [stdout] 312 | | io::ErrorKind::Other, [INFO] [stdout] 313 | | format!( [INFO] [stdout] 314 | | "preprocessor command could not start: '{cmd:?}': {err}", [INFO] [stdout] 315 | | ), [INFO] [stdout] 316 | | ) [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 311 ~ io::Error::other( [INFO] [stdout] 312 ~ format!( [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> crates/core/search.rs:319:13 [INFO] [stdout] | [INFO] [stdout] 319 | / io::Error::new( [INFO] [stdout] 320 | | io::ErrorKind::Other, [INFO] [stdout] 321 | | format!("preprocessor command failed: '{cmd:?}': {err}"), [INFO] [stdout] 322 | | ) [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 319 ~ io::Error::other( [INFO] [stdout] 320 ~ format!("preprocessor command failed: '{cmd:?}': {err}"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> crates/core/search.rs:396:24 [INFO] [stdout] | [INFO] [stdout] 396 | stats: sink.stats().map(|s| s.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `sink.stats().cloned()` [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] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> crates/core/search.rs:404:24 [INFO] [stdout] | [INFO] [stdout] 404 | stats: sink.stats().map(|s| s.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `sink.stats().cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> crates/core/search.rs:433:24 [INFO] [stdout] | [INFO] [stdout] 433 | stats: sink.stats().map(|s| s.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `sink.stats().cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> crates/core/search.rs:441:24 [INFO] [stdout] | [INFO] [stdout] 441 | stats: sink.stats().map(|s| s.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `sink.stats().cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `print` doesn't need a mutable reference [INFO] [stdout] --> crates/core/main.rs:288:38 [INFO] [stdout] | [INFO] [stdout] 288 | let _ = bufwtr.print(&mut wtr); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 288 - let _ = bufwtr.print(&mut wtr); [INFO] [stdout] 288 + let _ = bufwtr.print(&wtr); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/core/main.rs:288:38 [INFO] [stdout] | [INFO] [stdout] 288 | let _ = bufwtr.print(&mut wtr); [INFO] [stdout] | ^^^^^^^^ help: change this to: `wtr` [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: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> crates/core/main.rs:533:9 [INFO] [stdout] | [INFO] [stdout] 533 | write!(wtr, "\n") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 533 - write!(wtr, "\n") [INFO] [stdout] 533 + writeln!(wtr) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/util.rs:78:60 [INFO] [stdout] | [INFO] [stdout] 78 | env::temp_dir().join(TEST_DIR).join(name).join(&format!("{id}")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `format!("{id}")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> tests/util.rs:496:5 [INFO] [stdout] | [INFO] [stdout] 496 | std::env::var("CROSS_RUNNER").ok().map_or(false, |v| !v.is_empty()) [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] 496 - std::env::var("CROSS_RUNNER").ok().map_or(false, |v| !v.is_empty()) [INFO] [stdout] 496 + std::env::var("CROSS_RUNNER").ok().is_some_and(|v| !v.is_empty()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:39:14 [INFO] [stdout] | [INFO] [stdout] 39 | cmd.args(&["--mmap", "-n", "Project Gutenberg EBook", "-g", "hay"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--mmap", "-n", "Project Gutenberg EBook", "-g", "hay"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:52:14 [INFO] [stdout] | [INFO] [stdout] 52 | cmd.args(&["--mmap", "-n", "Project Gutenberg EBook", "hay"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--mmap", "-n", "Project Gutenberg EBook", "hay"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:67:14 [INFO] [stdout] | [INFO] [stdout] 67 | cmd.args(&["--mmap", "-n", "abcdef", "hay"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--mmap", "-n", "abcdef", "hay"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:79:14 [INFO] [stdout] | [INFO] [stdout] 79 | cmd.args(&["--mmap", "-c", "Project Gutenberg EBook|Heaven", "hay"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--mmap", "-c", "Project Gutenberg EBook|Heaven", "hay"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:93:14 [INFO] [stdout] | [INFO] [stdout] 93 | cmd.args(&["--mmap", "-n", "Project Gutenberg EBook|Heaven", "hay"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--mmap", "-n", "Project Gutenberg EBook|Heaven", "hay"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:110:14 [INFO] [stdout] | [INFO] [stdout] 110 | cmd.args(&["--mmap", "-n", "--binary", "Heaven", "-g", "hay"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--mmap", "-n", "--binary", "Heaven", "-g", "hay"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:122:14 [INFO] [stdout] | [INFO] [stdout] 122 | cmd.args(&["--mmap", "-n", "--text", "Heaven", "-g", "hay"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--mmap", "-n", "--text", "Heaven", "-g", "hay"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:136:14 [INFO] [stdout] | [INFO] [stdout] 136 | cmd.args(&["--mmap", "-n", "medical student", "hay"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--mmap", "-n", "medical student", "hay"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:164:14 [INFO] [stdout] | [INFO] [stdout] 164 | cmd.args(&["--no-mmap", "-n", "Project Gutenberg EBook", "-g", "hay"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--no-mmap", "-n", "Project Gutenberg EBook", "-g", "hay"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:177:14 [INFO] [stdout] | [INFO] [stdout] 177 | cmd.args(&["--no-mmap", "-n", "Project Gutenberg EBook", "hay"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--no-mmap", "-n", "Project Gutenberg EBook", "hay"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:188:14 [INFO] [stdout] | [INFO] [stdout] 188 | cmd.args(&["--no-mmap", "-n", "Project Gutenberg EBook"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--no-mmap", "-n", "Project Gutenberg EBook"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:202:14 [INFO] [stdout] | [INFO] [stdout] 202 | cmd.args(&[ [INFO] [stdout] | ______________^ [INFO] [stdout] 203 | | "--no-mmap", [INFO] [stdout] 204 | | "-n", [INFO] [stdout] 205 | | "--binary", [INFO] [stdout] ... | [INFO] [stdout] 208 | | "hay", [INFO] [stdout] 209 | | ]); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 202 ~ cmd.args([ [INFO] [stdout] 203 + "--no-mmap", [INFO] [stdout] 204 + "-n", [INFO] [stdout] 205 + "--binary", [INFO] [stdout] 206 + "Project Gutenberg EBook", [INFO] [stdout] 207 + "-g", [INFO] [stdout] 208 + "hay", [INFO] [stdout] 209 ~ ]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:222:14 [INFO] [stdout] | [INFO] [stdout] 222 | cmd.args(&[ [INFO] [stdout] | ______________^ [INFO] [stdout] 223 | | "--no-mmap", [INFO] [stdout] 224 | | "-n", [INFO] [stdout] 225 | | "--text", [INFO] [stdout] ... | [INFO] [stdout] 228 | | "hay", [INFO] [stdout] 229 | | ]); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 222 ~ cmd.args([ [INFO] [stdout] 223 + "--no-mmap", [INFO] [stdout] 224 + "-n", [INFO] [stdout] 225 + "--text", [INFO] [stdout] 226 + "Project Gutenberg EBook", [INFO] [stdout] 227 + "-g", [INFO] [stdout] 228 + "hay", [INFO] [stdout] 229 ~ ]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:241:14 [INFO] [stdout] | [INFO] [stdout] 241 | cmd.args(&["--no-mmap", "-n", "--text", "Project Gutenberg EBook", "hay"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--no-mmap", "-n", "--text", "Project Gutenberg EBook", "hay"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:264:14 [INFO] [stdout] | [INFO] [stdout] 264 | cmd.args(&["--no-mmap", "-l", "Project Gutenberg EBook", "-g", "hay"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--no-mmap", "-l", "Project Gutenberg EBook", "-g", "hay"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:273:14 [INFO] [stdout] | [INFO] [stdout] 273 | cmd.args(&["--no-mmap", "-q", "Project Gutenberg EBook", "-g", "hay"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--no-mmap", "-q", "Project Gutenberg EBook", "-g", "hay"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:283:14 [INFO] [stdout] | [INFO] [stdout] 283 | cmd.args(&["--no-mmap", "-c", "Project Gutenberg EBook", "-g", "hay"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--no-mmap", "-c", "Project Gutenberg EBook", "-g", "hay"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:293:18 [INFO] [stdout] | [INFO] [stdout] 293 | cmd.args(&[ [INFO] [stdout] | __________________^ [INFO] [stdout] 294 | | "--no-mmap", [INFO] [stdout] 295 | | "-c", [INFO] [stdout] 296 | | "--binary", [INFO] [stdout] ... | [INFO] [stdout] 299 | | "hay", [INFO] [stdout] 300 | | ]); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 293 ~ cmd.args([ [INFO] [stdout] 294 + "--no-mmap", [INFO] [stdout] 295 + "-c", [INFO] [stdout] 296 + "--binary", [INFO] [stdout] 297 + "Project Gutenberg EBook", [INFO] [stdout] 298 + "-g", [INFO] [stdout] 299 + "hay", [INFO] [stdout] 300 ~ ]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:310:14 [INFO] [stdout] | [INFO] [stdout] 310 | cmd.args(&["--no-mmap", "-c", "Project Gutenberg EBook", "hay"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--no-mmap", "-c", "Project Gutenberg EBook", "hay"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:318:14 [INFO] [stdout] | [INFO] [stdout] 318 | cmd.args(&[ [INFO] [stdout] | ______________^ [INFO] [stdout] 319 | | "--no-mmap", [INFO] [stdout] 320 | | "-n", [INFO] [stdout] 321 | | "Project Gutenberg EBook|a medical student", [INFO] [stdout] 322 | | "-g", [INFO] [stdout] 323 | | "hay", [INFO] [stdout] 324 | | ]); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 318 ~ cmd.args([ [INFO] [stdout] 319 + "--no-mmap", [INFO] [stdout] 320 + "-n", [INFO] [stdout] 321 + "Project Gutenberg EBook|a medical student", [INFO] [stdout] 322 + "-g", [INFO] [stdout] 323 + "hay", [INFO] [stdout] 324 ~ ]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:337:14 [INFO] [stdout] | [INFO] [stdout] 337 | cmd.args(&[ [INFO] [stdout] | ______________^ [INFO] [stdout] 338 | | "--no-mmap", [INFO] [stdout] 339 | | "-n", [INFO] [stdout] 340 | | "--text", [INFO] [stdout] ... | [INFO] [stdout] 343 | | "hay", [INFO] [stdout] 344 | | ]); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 337 ~ cmd.args([ [INFO] [stdout] 338 + "--no-mmap", [INFO] [stdout] 339 + "-n", [INFO] [stdout] 340 + "--text", [INFO] [stdout] 341 + "Project Gutenberg EBook|a medical student", [INFO] [stdout] 342 + "-g", [INFO] [stdout] 343 + "hay", [INFO] [stdout] 344 ~ ]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:357:14 [INFO] [stdout] | [INFO] [stdout] 357 | cmd.args(&["--no-mmap", "-n", "Heaven", "-g", "hay"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--no-mmap", "-n", "Heaven", "-g", "hay"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:365:14 [INFO] [stdout] | [INFO] [stdout] 365 | cmd.args(&["--no-mmap", "-n", "Heaven", "hay"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--no-mmap", "-n", "Heaven", "hay"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:378:14 [INFO] [stdout] | [INFO] [stdout] 378 | cmd.args(&["--no-mmap", "-n", "--binary", "Heaven", "-g", "hay"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--no-mmap", "-n", "--binary", "Heaven", "-g", "hay"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:390:14 [INFO] [stdout] | [INFO] [stdout] 390 | cmd.args(&["--no-mmap", "-n", "--text", "Heaven", "-g", "hay"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--no-mmap", "-n", "--text", "Heaven", "-g", "hay"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:402:14 [INFO] [stdout] | [INFO] [stdout] 402 | cmd.args(&["--no-mmap", "-n", "a medical student", "-g", "hay"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--no-mmap", "-n", "a medical student", "-g", "hay"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:413:14 [INFO] [stdout] | [INFO] [stdout] 413 | cmd.args(&["--no-mmap", "-n", "a medical student", "hay"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--no-mmap", "-n", "a medical student", "hay"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:425:14 [INFO] [stdout] | [INFO] [stdout] 425 | cmd.args(&["--no-mmap", "-n", "--text", "a medical student", "-g", "hay"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--no-mmap", "-n", "--text", "a medical student", "-g", "hay"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> tests/binary.rs:442:9 [INFO] [stdout] | [INFO] [stdout] 442 | file1.push_str("\x00"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `file1.push('\x00')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:447:38 [INFO] [stdout] | [INFO] [stdout] 447 | let got = dir.command().args(&["--sort=path", "-l", "cat"]).stdout(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--sort=path", "-l", "cat"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:453:38 [INFO] [stdout] | [INFO] [stdout] 453 | let got = dir.command().args(&["--sort=path", "-c", "cat"]).stdout(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--sort=path", "-c", "cat"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:458:19 [INFO] [stdout] | [INFO] [stdout] 458 | .args(&["--sort=path", "-c", "cat", "--binary"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--sort=path", "-c", "cat", "--binary"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/binary.rs:464:19 [INFO] [stdout] | [INFO] [stdout] 464 | .args(&["--sort=path", "-c", "cat", "--text"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--sort=path", "-c", "cat", "--text"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/feature.rs:156:14 [INFO] [stdout] | [INFO] [stdout] 156 | cmd.args(&["--ignore-file", "../.not-an-ignore", "-l", "test"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--ignore-file", "../.not-an-ignore", "-l", "test"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/feature.rs:183:14 [INFO] [stdout] | [INFO] [stdout] 183 | cmd.args(&[ [INFO] [stdout] | ______________^ [INFO] [stdout] 184 | | "--ignore-file", [INFO] [stdout] 185 | | ".not-an-ignore1", [INFO] [stdout] 186 | | "--ignore-file", [INFO] [stdout] 187 | | ".not-an-ignore2", [INFO] [stdout] 188 | | "test", [INFO] [stdout] 189 | | ]); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 183 ~ cmd.args([ [INFO] [stdout] 184 + "--ignore-file", [INFO] [stdout] 185 + ".not-an-ignore1", [INFO] [stdout] 186 + "--ignore-file", [INFO] [stdout] 187 + ".not-an-ignore2", [INFO] [stdout] 188 + "test", [INFO] [stdout] 189 ~ ]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/feature.rs:551:14 [INFO] [stdout] | [INFO] [stdout] 551 | cmd.args(&["-e", "foo", "-e", "bar", "file"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-e", "foo", "-e", "bar", "file"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/feature.rs:557:14 [INFO] [stdout] | [INFO] [stdout] 557 | cmd.args(&["-f", "patterns", "file"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-f", "patterns", "file"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/feature.rs:563:14 [INFO] [stdout] | [INFO] [stdout] 563 | cmd.args(&["-c", "foo", "file"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-c", "foo", "file"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/feature.rs:578:14 [INFO] [stdout] | [INFO] [stdout] 578 | cmd.args(&["-o", "foo", "file"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-o", "foo", "file"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/feature.rs:593:14 [INFO] [stdout] | [INFO] [stdout] 593 | cmd.args(&["-r", "wat", "foo", "file"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-r", "wat", "foo", "file"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `cleanup` is never used [INFO] [stdout] --> crates/core/cache.rs:61:19 [INFO] [stdout] | [INFO] [stdout] 28 | impl DirectoryCache { [INFO] [stdout] | ------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 61 | pub(crate) fn cleanup(&mut self) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `clear` is never used [INFO] [stdout] --> crates/core/cache.rs:138:19 [INFO] [stdout] | [INFO] [stdout] 96 | impl SearchResultCache { [INFO] [stdout] | ---------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 138 | pub(crate) fn clear(&mut self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> crates/core/cache.rs:164:19 [INFO] [stdout] | [INFO] [stdout] 162 | impl BoundedSearch { [INFO] [stdout] | ------------------ associated function in this implementation [INFO] [stdout] 163 | /// Create bounded search with custom limits. [INFO] [stdout] 164 | pub(crate) fn new(max_results: usize) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `wsl2_optimized` is never read [INFO] [stdout] --> crates/core/flags/hiargs.rs:58:16 [INFO] [stdout] | [INFO] [stdout] 36 | pub(crate) struct HiArgs { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] ... [INFO] [stdout] 58 | pub(crate) wsl2_optimized: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `HiArgs` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `weights` is never read [INFO] [stdout] --> crates/core/heuristic.rs:101:9 [INFO] [stdout] | [INFO] [stdout] 89 | pub(crate) struct HeuristicConfig { [INFO] [stdout] | --------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 101 | pub weights: ScoringWeights, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `HeuristicConfig` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `with_weights` is never used [INFO] [stdout] --> crates/core/heuristic.rs:124:19 [INFO] [stdout] | [INFO] [stdout] 104 | impl HeuristicConfig { [INFO] [stdout] | -------------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 124 | pub(crate) fn with_weights( [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_cached` and `stats` are never used [INFO] [stdout] --> crates/core/incremental.rs:159:19 [INFO] [stdout] | [INFO] [stdout] 59 | impl IncrementalSearch { [INFO] [stdout] | ---------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 159 | pub(crate) fn get_cached(&self) -> Option<&[IncrementalResult]> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 175 | pub(crate) fn stats(&self) -> (usize, usize) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `clear` and `len` are never used [INFO] [stdout] --> crates/core/optimizer.rs:54:19 [INFO] [stdout] | [INFO] [stdout] 24 | impl PatternCache { [INFO] [stdout] | ----------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 54 | pub(crate) fn clear(&mut self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 60 | pub(crate) fn len(&self) -> usize { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `clear` and `stats` are never used [INFO] [stdout] --> crates/core/optimizer.rs:128:19 [INFO] [stdout] | [INFO] [stdout] 83 | impl FileContentCache { [INFO] [stdout] | --------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 128 | pub(crate) fn clear(&mut self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 136 | pub(crate) fn stats(&self) -> (usize, usize) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `save` is never used [INFO] [stdout] --> crates/core/ripgrep_config.rs:172:19 [INFO] [stdout] | [INFO] [stdout] 123 | impl RipgrepConfig { [INFO] [stdout] | ------------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 172 | pub(crate) fn save(&self) -> Result<()> { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/feature.rs:633:14 [INFO] [stdout] | [INFO] [stdout] 633 | cmd.args(&["-n", "-B1", "-A2", "--trim", "Holmeses", "sherlock"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-n", "-B1", "-A2", "--trim", "Holmeses", "sherlock"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/feature.rs:659:14 [INFO] [stdout] | [INFO] [stdout] 659 | cmd.args(&["-n", "-B1", "-A2", "--trim", r"\s+Holmeses", "sherlock"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-n", "-B1", "-A2", "--trim", r"\s+Holmeses", "sherlock"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/feature.rs:673:14 [INFO] [stdout] | [INFO] [stdout] 673 | cmd.args(&["--multiline", "--trim", "-r$0", "--no-filename", r"a\n?bc"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--multiline", "--trim", "-r$0", "--no-filename", r"a\n?bc"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/feature.rs:682:14 [INFO] [stdout] | [INFO] [stdout] 682 | cmd.args(&[ [INFO] [stdout] | ______________^ [INFO] [stdout] 683 | | "--trim", [INFO] [stdout] 684 | | "--max-columns-preview", [INFO] [stdout] 685 | | "-M8", [INFO] [stdout] 686 | | "--no-filename", [INFO] [stdout] 687 | | "abc", [INFO] [stdout] 688 | | ]); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 682 ~ cmd.args([ [INFO] [stdout] 683 + "--trim", [INFO] [stdout] 684 + "--max-columns-preview", [INFO] [stdout] 685 + "-M8", [INFO] [stdout] 686 + "--no-filename", [INFO] [stdout] 687 + "abc", [INFO] [stdout] 688 ~ ]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/feature.rs:697:14 [INFO] [stdout] | [INFO] [stdout] 697 | cmd.args(&[ [INFO] [stdout] | ______________^ [INFO] [stdout] 698 | | "--trim", [INFO] [stdout] 699 | | "--max-columns-preview", [INFO] [stdout] 700 | | "-M8", [INFO] [stdout] ... | [INFO] [stdout] 704 | | "abc", [INFO] [stdout] 705 | | ]); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 697 ~ cmd.args([ [INFO] [stdout] 698 + "--trim", [INFO] [stdout] 699 + "--max-columns-preview", [INFO] [stdout] 700 + "-M8", [INFO] [stdout] 701 + "--color=always", [INFO] [stdout] 702 + "--colors=path:none", [INFO] [stdout] 703 + "--no-filename", [INFO] [stdout] 704 + "abc", [INFO] [stdout] 705 ~ ]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/feature.rs:716:18 [INFO] [stdout] | [INFO] [stdout] 716 | cmd.args(&[ [INFO] [stdout] | __________________^ [INFO] [stdout] 717 | | "--multiline", [INFO] [stdout] 718 | | "--trim", [INFO] [stdout] 719 | | "--max-columns-preview", [INFO] [stdout] ... | [INFO] [stdout] 726 | | r"a\n?bc", [INFO] [stdout] 727 | | ]); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 716 ~ cmd.args([ [INFO] [stdout] 717 + "--multiline", [INFO] [stdout] 718 + "--trim", [INFO] [stdout] 719 + "--max-columns-preview", [INFO] [stdout] 720 + "-M8", [INFO] [stdout] 721 + // Force the "slow" printing path without actually [INFO] [stdout] 722 + // putting colors in the output. [INFO] [stdout] 723 + "--color=always", [INFO] [stdout] 724 + "--colors=path:none", [INFO] [stdout] 725 + "--no-filename", [INFO] [stdout] 726 + r"a\n?bc", [INFO] [stdout] 727 ~ ]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/feature.rs:739:18 [INFO] [stdout] | [INFO] [stdout] 739 | cmd.args(&[ [INFO] [stdout] | __________________^ [INFO] [stdout] 740 | | "--multiline", [INFO] [stdout] 741 | | "--trim", [INFO] [stdout] 742 | | "--max-columns-preview", [INFO] [stdout] ... | [INFO] [stdout] 746 | | r".*a\n?bc.*", [INFO] [stdout] 747 | | ]); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 739 ~ cmd.args([ [INFO] [stdout] 740 + "--multiline", [INFO] [stdout] 741 + "--trim", [INFO] [stdout] 742 + "--max-columns-preview", [INFO] [stdout] 743 + "-M8", [INFO] [stdout] 744 + "--only-matching", [INFO] [stdout] 745 + "--no-filename", [INFO] [stdout] 746 + r".*a\n?bc.*", [INFO] [stdout] 747 ~ ]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/core/flags/complete/fish.rs:26:32 [INFO] [stdout] | [INFO] [stdout] 26 | .replace("!LONG!", &long) [INFO] [stdout] | ^^^^^ help: change this to: `long` [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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> crates/core/flags/complete/fish.rs:44:17 [INFO] [stdout] | [INFO] [stdout] 44 | completion.push_str("'"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `completion.push('\'')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> crates/core/flags/complete/fish.rs:49:17 [INFO] [stdout] | [INFO] [stdout] 49 | completion.push_str("'"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `completion.push('\'')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/core/flags/complete/fish.rs:67:43 [INFO] [stdout] | [INFO] [stdout] 67 | .replace("!NEGATED!", &negated) [INFO] [stdout] | ^^^^^^^^ help: change this to: `negated` [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] --> crates/core/flags/complete/fish.rs:69:40 [INFO] [stdout] | [INFO] [stdout] 69 | .replace("!LONG!", &long) [INFO] [stdout] | ^^^^^ help: change this to: `long` [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: the borrowed expression implements the required traits [INFO] [stdout] --> tests/feature.rs:759:18 [INFO] [stdout] | [INFO] [stdout] 759 | cmd.args(&[ [INFO] [stdout] | __________________^ [INFO] [stdout] 760 | | "--multiline", [INFO] [stdout] 761 | | "--trim", [INFO] [stdout] 762 | | "--max-columns-preview", [INFO] [stdout] ... | [INFO] [stdout] 766 | | r".*a\n?bc.*", [INFO] [stdout] 767 | | ]); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 759 ~ cmd.args([ [INFO] [stdout] 760 + "--multiline", [INFO] [stdout] 761 + "--trim", [INFO] [stdout] 762 + "--max-columns-preview", [INFO] [stdout] 763 + "-M8", [INFO] [stdout] 764 + "--vimgrep", [INFO] [stdout] 765 + "--no-filename", [INFO] [stdout] 766 + r".*a\n?bc.*", [INFO] [stdout] 767 ~ ]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/core/flags/complete/powershell.rs:57:36 [INFO] [stdout] | [INFO] [stdout] 57 | .replace("!NAME!", &name) [INFO] [stdout] | ^^^^^ help: change this to: `name` [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] --> crates/core/flags/complete/powershell.rs:79:40 [INFO] [stdout] | [INFO] [stdout] 79 | .replace("!NAME!", &negated) [INFO] [stdout] | ^^^^^^^^ help: change this to: `negated` [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: doc list item without indentation [INFO] [stdout] --> crates/core/flags/complete/zsh.rs:9:1 [INFO] [stdout] | [INFO] [stdout] 9 | Namely, the zsh completions take application level context about flag [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 9 | Namely, the zsh completions take application level context about flag [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/core/flags/complete/zsh.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | compatibility into account. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 10 | compatibility into account. [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/feature.rs:790:14 [INFO] [stdout] | [INFO] [stdout] 790 | cmd.args(&[ [INFO] [stdout] | ______________^ [INFO] [stdout] 791 | | "-M46", [INFO] [stdout] 792 | | "--max-columns-preview", [INFO] [stdout] 793 | | "exhibited|dusted|has to have it", [INFO] [stdout] 794 | | ]); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 790 ~ cmd.args([ [INFO] [stdout] 791 + "-M46", [INFO] [stdout] 792 + "--max-columns-preview", [INFO] [stdout] 793 + "exhibited|dusted|has to have it", [INFO] [stdout] 794 ~ ]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/core/flags/complete/zsh.rs:12:1 [INFO] [stdout] | [INFO] [stdout] 12 | isn't included in the zsh completions. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 12 | isn't included in the zsh completions. [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/core/flags/complete/zsh.rs:14:1 [INFO] [stdout] | [INFO] [stdout] 14 | works and how it can be extended. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 14 | works and how it can be extended. [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/feature.rs:805:14 [INFO] [stdout] | [INFO] [stdout] 805 | cmd.args(&[ [INFO] [stdout] | ______________^ [INFO] [stdout] 806 | | "-M43", [INFO] [stdout] 807 | | "--max-columns-preview", [INFO] [stdout] ... | [INFO] [stdout] 812 | | "exhibited|dusted|has to have it", [INFO] [stdout] 813 | | ]); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 805 ~ cmd.args([ [INFO] [stdout] 806 + "-M43", [INFO] [stdout] 807 + "--max-columns-preview", [INFO] [stdout] 808 + // Doing a replacement forces ripgrep to show the number of remaining [INFO] [stdout] 809 + // matches. Normally, this happens by default when printing a tty with [INFO] [stdout] 810 + // colors. [INFO] [stdout] 811 + "-rxxx", [INFO] [stdout] 812 + "exhibited|dusted|has to have it", [INFO] [stdout] 813 ~ ]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> crates/core/flags/config.rs:61:31 [INFO] [stdout] | [INFO] [stdout] 61 | match std::fs::File::open(&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_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/feature.rs:885:27 [INFO] [stdout] | [INFO] [stdout] 885 | let stdout = cmd.args(&["--sort", "path", "--files"]).stdout(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--sort", "path", "--files"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/feature.rs:889:18 [INFO] [stdout] | [INFO] [stdout] 889 | cmd.args(&["--sort", "path", "--files", "--no-require-git"]).stdout(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--sort", "path", "--files", "--no-require-git"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/feature.rs:893:15 [INFO] [stdout] | [INFO] [stdout] 893 | .args(&[ [INFO] [stdout] | _______________^ [INFO] [stdout] 894 | | "--sort", [INFO] [stdout] 895 | | "path", [INFO] [stdout] 896 | | "--files", [INFO] [stdout] 897 | | "--no-require-git", [INFO] [stdout] 898 | | "--require-git", [INFO] [stdout] 899 | | ]) [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 893 ~ .args([ [INFO] [stdout] 894 + "--sort", [INFO] [stdout] 895 + "path", [INFO] [stdout] 896 + "--files", [INFO] [stdout] 897 + "--no-require-git", [INFO] [stdout] 898 + "--require-git", [INFO] [stdout] 899 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/core/flags/defs.rs:624:5 [INFO] [stdout] | [INFO] [stdout] 624 | assert_eq!(false, args.byte_offset); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 624 - assert_eq!(false, args.byte_offset); [INFO] [stdout] 624 + assert!(!args.byte_offset); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/core/flags/defs.rs:627:5 [INFO] [stdout] | [INFO] [stdout] 627 | assert_eq!(true, args.byte_offset); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 627 - assert_eq!(true, args.byte_offset); [INFO] [stdout] 627 + assert!(args.byte_offset); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/core/flags/defs.rs:630:5 [INFO] [stdout] | [INFO] [stdout] 630 | assert_eq!(true, args.byte_offset); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 630 - assert_eq!(true, args.byte_offset); [INFO] [stdout] 630 + assert!(args.byte_offset); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/core/flags/defs.rs:633:5 [INFO] [stdout] | [INFO] [stdout] 633 | assert_eq!(false, args.byte_offset); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 633 - assert_eq!(false, args.byte_offset); [INFO] [stdout] 633 + assert!(!args.byte_offset); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/core/flags/defs.rs:636:5 [INFO] [stdout] | [INFO] [stdout] 636 | assert_eq!(true, args.byte_offset); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 636 - assert_eq!(true, args.byte_offset); [INFO] [stdout] 636 + assert!(args.byte_offset); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/feature.rs:1100:14 [INFO] [stdout] | [INFO] [stdout] 1100 | cmd.args(&["-C1", "-A2", "5", "test"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-C1", "-A2", "5", "test"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/feature.rs:1109:18 [INFO] [stdout] | [INFO] [stdout] 1109 | cmd.args(&["-A2", "-C1", "5", "test"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-A2", "-C1", "5", "test"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/feature.rs:1116:14 [INFO] [stdout] | [INFO] [stdout] 1116 | cmd.args(&["-A1", "--no-context-separator", "foo", "test"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-A1", "--no-context-separator", "foo", "test"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/feature.rs:1122:14 [INFO] [stdout] | [INFO] [stdout] 1122 | cmd.args(&[ [INFO] [stdout] | ______________^ [INFO] [stdout] 1123 | | "-A1", [INFO] [stdout] 1124 | | "--context-separator", [INFO] [stdout] 1125 | | "AAA", [INFO] [stdout] ... | [INFO] [stdout] 1128 | | "test", [INFO] [stdout] 1129 | | ]); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 1122 ~ cmd.args([ [INFO] [stdout] 1123 + "-A1", [INFO] [stdout] 1124 + "--context-separator", [INFO] [stdout] 1125 + "AAA", [INFO] [stdout] 1126 + "--no-context-separator", [INFO] [stdout] 1127 + "foo", [INFO] [stdout] 1128 + "test", [INFO] [stdout] 1129 ~ ]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/feature.rs:1135:14 [INFO] [stdout] | [INFO] [stdout] 1135 | cmd.args(&[ [INFO] [stdout] | ______________^ [INFO] [stdout] 1136 | | "-A1", [INFO] [stdout] 1137 | | "--no-context-separator", [INFO] [stdout] 1138 | | "--context-separator", [INFO] [stdout] ... | [INFO] [stdout] 1141 | | "test", [INFO] [stdout] 1142 | | ]); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 1135 ~ cmd.args([ [INFO] [stdout] 1136 + "-A1", [INFO] [stdout] 1137 + "--no-context-separator", [INFO] [stdout] 1138 + "--context-separator", [INFO] [stdout] 1139 + "AAA", [INFO] [stdout] 1140 + "foo", [INFO] [stdout] 1141 + "test", [INFO] [stdout] 1142 ~ ]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/feature.rs:1148:14 [INFO] [stdout] | [INFO] [stdout] 1148 | cmd.args(&["-A1", "--context-separator", "AAA", "foo", "test"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-A1", "--context-separator", "AAA", "foo", "test"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/feature.rs:1154:14 [INFO] [stdout] | [INFO] [stdout] 1154 | cmd.args(&["-A1", "foo", "test"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-A1", "foo", "test"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/feature.rs:1160:14 [INFO] [stdout] | [INFO] [stdout] 1160 | cmd.args(&["-A1", "--context-separator", "", "foo", "test"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-A1", "--context-separator", "", "foo", "test"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/feature.rs:1172:14 [INFO] [stdout] | [INFO] [stdout] 1172 | cmd.args(&["--stop-on-nonmatch", "[235]"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--stop-on-nonmatch", "[235]"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/core/flags/defs.rs:1434:5 [INFO] [stdout] | [INFO] [stdout] 1434 | assert_eq!(false, args.crlf); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1434 - assert_eq!(false, args.crlf); [INFO] [stdout] 1434 + assert!(!args.crlf); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/core/flags/defs.rs:1437:5 [INFO] [stdout] | [INFO] [stdout] 1437 | assert_eq!(true, args.crlf); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1437 - assert_eq!(true, args.crlf); [INFO] [stdout] 1437 + assert!(args.crlf); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/core/flags/defs.rs:1438:5 [INFO] [stdout] | [INFO] [stdout] 1438 | assert_eq!(false, args.null_data); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1438 - assert_eq!(false, args.null_data); [INFO] [stdout] 1438 + assert!(!args.null_data); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/core/flags/defs.rs:1441:5 [INFO] [stdout] | [INFO] [stdout] 1441 | assert_eq!(false, args.crlf); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1441 - assert_eq!(false, args.crlf); [INFO] [stdout] 1441 + assert!(!args.crlf); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/core/flags/defs.rs:1442:5 [INFO] [stdout] | [INFO] [stdout] 1442 | assert_eq!(true, args.null_data); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1442 - assert_eq!(true, args.null_data); [INFO] [stdout] 1442 + assert!(args.null_data); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/core/flags/defs.rs:1445:5 [INFO] [stdout] | [INFO] [stdout] 1445 | assert_eq!(true, args.crlf); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1445 - assert_eq!(true, args.crlf); [INFO] [stdout] 1445 + assert!(args.crlf); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/core/flags/defs.rs:1446:5 [INFO] [stdout] | [INFO] [stdout] 1446 | assert_eq!(false, args.null_data); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1446 - assert_eq!(false, args.null_data); [INFO] [stdout] 1446 + assert!(!args.null_data); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/core/flags/defs.rs:1449:5 [INFO] [stdout] | [INFO] [stdout] 1449 | assert_eq!(false, args.crlf); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1449 - assert_eq!(false, args.crlf); [INFO] [stdout] 1449 + assert!(!args.crlf); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/core/flags/defs.rs:1450:5 [INFO] [stdout] | [INFO] [stdout] 1450 | assert_eq!(true, args.null_data); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1450 - assert_eq!(true, args.null_data); [INFO] [stdout] 1450 + assert!(args.null_data); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/core/flags/defs.rs:1453:5 [INFO] [stdout] | [INFO] [stdout] 1453 | assert_eq!(false, args.crlf); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1453 - assert_eq!(false, args.crlf); [INFO] [stdout] 1453 + assert!(!args.crlf); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/core/flags/defs.rs:1454:5 [INFO] [stdout] | [INFO] [stdout] 1454 | assert_eq!(false, args.null_data); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1454 - assert_eq!(false, args.null_data); [INFO] [stdout] 1454 + assert!(!args.null_data); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/core/flags/defs.rs:2327:5 [INFO] [stdout] | [INFO] [stdout] 2327 | assert_eq!(false, args.fixed_strings); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 2327 - assert_eq!(false, args.fixed_strings); [INFO] [stdout] 2327 + assert!(!args.fixed_strings); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/core/flags/defs.rs:2330:5 [INFO] [stdout] | [INFO] [stdout] 2330 | assert_eq!(true, args.fixed_strings); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 2330 - assert_eq!(true, args.fixed_strings); [INFO] [stdout] 2330 + assert!(args.fixed_strings); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/core/flags/defs.rs:2333:5 [INFO] [stdout] | [INFO] [stdout] 2333 | assert_eq!(true, args.fixed_strings); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 2333 - assert_eq!(true, args.fixed_strings); [INFO] [stdout] 2333 + assert!(args.fixed_strings); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/core/flags/defs.rs:2336:5 [INFO] [stdout] | [INFO] [stdout] 2336 | assert_eq!(false, args.fixed_strings); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 2336 - assert_eq!(false, args.fixed_strings); [INFO] [stdout] 2336 + assert!(!args.fixed_strings); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/core/flags/defs.rs:2339:5 [INFO] [stdout] | [INFO] [stdout] 2339 | assert_eq!(true, args.fixed_strings); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 2339 - assert_eq!(true, args.fixed_strings); [INFO] [stdout] 2339 + assert!(args.fixed_strings); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> crates/core/flags/defs.rs:2453:12 [INFO] [stdout] | [INFO] [stdout] 2453 | if threshold < 0.0 || threshold > 1.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(0.0..=1.0).contains(&threshold)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/core/flags/defs.rs:2574:5 [INFO] [stdout] | [INFO] [stdout] 2574 | assert_eq!(false, args.follow); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 2574 - assert_eq!(false, args.follow); [INFO] [stdout] 2574 + assert!(!args.follow); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/core/flags/defs.rs:2577:5 [INFO] [stdout] | [INFO] [stdout] 2577 | assert_eq!(true, args.follow); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 2577 - assert_eq!(true, args.follow); [INFO] [stdout] 2577 + assert!(args.follow); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/core/flags/defs.rs:2580:5 [INFO] [stdout] | [INFO] [stdout] 2580 | assert_eq!(true, args.follow); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 2580 - assert_eq!(true, args.follow); [INFO] [stdout] 2580 + assert!(args.follow); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/core/flags/defs.rs:2583:5 [INFO] [stdout] | [INFO] [stdout] 2583 | assert_eq!(false, args.follow); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 2583 - assert_eq!(false, args.follow); [INFO] [stdout] 2583 + assert!(!args.follow); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/core/flags/defs.rs:2586:5 [INFO] [stdout] | [INFO] [stdout] 2586 | assert_eq!(true, args.follow); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 2586 - assert_eq!(true, args.follow); [INFO] [stdout] 2586 + assert!(args.follow); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/core/flags/defs.rs:2821:5 [INFO] [stdout] | [INFO] [stdout] 2821 | assert_eq!(false, args.glob_case_insensitive); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 2821 - assert_eq!(false, args.glob_case_insensitive); [INFO] [stdout] 2821 + assert!(!args.glob_case_insensitive); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/core/flags/defs.rs:2824:5 [INFO] [stdout] | [INFO] [stdout] 2824 | assert_eq!(true, args.glob_case_insensitive); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 2824 - assert_eq!(true, args.glob_case_insensitive); [INFO] [stdout] 2824 + assert!(args.glob_case_insensitive); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/core/flags/defs.rs:2831:5 [INFO] [stdout] | [INFO] [stdout] 2831 | assert_eq!(false, args.glob_case_insensitive); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 2831 - assert_eq!(false, args.glob_case_insensitive); [INFO] [stdout] 2831 + assert!(!args.glob_case_insensitive); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/core/flags/defs.rs:2838:5 [INFO] [stdout] | [INFO] [stdout] 2838 | assert_eq!(true, args.glob_case_insensitive); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 2838 - assert_eq!(true, args.glob_case_insensitive); [INFO] [stdout] 2838 + assert!(args.glob_case_insensitive); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> tests/json.rs:288:8 [WARN] too many lines in the log, truncating it