[INFO] cloning repository https://github.com/daniel-china-sz/browscap-rs [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/daniel-china-sz/browscap-rs" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdaniel-china-sz%2Fbrowscap-rs", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdaniel-china-sz%2Fbrowscap-rs'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] f240733341ac2de445e7a37832cb472db2e74b32 [INFO] linting daniel-china-sz/browscap-rs against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdaniel-china-sz%2Fbrowscap-rs" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/daniel-china-sz/browscap-rs [INFO] finished tweaking git repo https://github.com/daniel-china-sz/browscap-rs [INFO] tweaked toml for git repo https://github.com/daniel-china-sz/browscap-rs written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/daniel-china-sz/browscap-rs 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/daniel-china-sz/browscap-rs already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded ustr v1.1.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] ad012c4a7d31353cb141d843498def1642c9d760184fde1fa55755089d5a2977 [INFO] running `Command { std: "docker" "start" "-a" "ad012c4a7d31353cb141d843498def1642c9d760184fde1fa55755089d5a2977", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "ad012c4a7d31353cb141d843498def1642c9d760184fde1fa55755089d5a2977", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ad012c4a7d31353cb141d843498def1642c9d760184fde1fa55755089d5a2977", kill_on_drop: false }` [INFO] [stdout] ad012c4a7d31353cb141d843498def1642c9d760184fde1fa55755089d5a2977 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 2bfc77ab043d5952ea87636efc47db65d32556eeb5a92bdd580dbb4c80153c88 [INFO] running `Command { std: "docker" "start" "-a" "2bfc77ab043d5952ea87636efc47db65d32556eeb5a92bdd580dbb4c80153c88", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.177 [INFO] [stderr] Compiling radium v0.7.0 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Checking regex-syntax v0.8.8 [INFO] [stderr] Checking tap v1.0.1 [INFO] [stderr] Checking csv-core v0.1.12 [INFO] [stderr] Checking funty v2.0.0 [INFO] [stderr] Checking ahash v0.8.12 [INFO] [stderr] Compiling syn v2.0.106 [INFO] [stderr] Checking wyz v0.5.1 [INFO] [stderr] Checking csv v1.3.1 [INFO] [stderr] Checking bitvec v1.0.1 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking atty v0.2.14 [INFO] [stderr] Checking regex-automata v0.4.13 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Checking dashmap v6.1.0 [INFO] [stderr] Checking ustr v1.1.0 [INFO] [stderr] Compiling thiserror-impl v2.0.17 [INFO] [stderr] Checking regex v1.12.2 [INFO] [stderr] Checking thiserror v2.0.17 [INFO] [stderr] Checking env_logger v0.9.3 [INFO] [stderr] Checking browscap-rs v0.1.1 (/opt/rustwide/workdir) [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/capabilities.rs:12:36 [INFO] [stdout] | [INFO] [stdout] 12 | pub const UNKNOWN_BROWSCAP_VALUE: &'static str = "Unknown"; [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: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/searchable_string.rs:133:16 [INFO] [stdout] | [INFO] [stdout] 133 | pub fn get(self: &Self, index: usize) -> Option { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] = note: `#[warn(clippy::needless_arbitrary_self_type)]` on by default [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 133 - pub fn get(self: &Self, index: usize) -> Option { [INFO] [stdout] 133 + pub fn get(&self, index: usize) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/user_agent_parser.rs:98:13 [INFO] [stdout] | [INFO] [stdout] 98 | my_filters: my_filters, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `my_filters` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/lib.rs:73:27 [INFO] [stdout] | [INFO] [stdout] 73 | const DEFAULT_FILE_NAME: &'static str = "browscap_sorted.csv"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/capabilities.rs:12:36 [INFO] [stdout] | [INFO] [stdout] 12 | pub const UNKNOWN_BROWSCAP_VALUE: &'static str = "Unknown"; [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: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/searchable_string.rs:133:16 [INFO] [stdout] | [INFO] [stdout] 133 | pub fn get(self: &Self, index: usize) -> Option { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] = note: `#[warn(clippy::needless_arbitrary_self_type)]` on by default [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 133 - pub fn get(self: &Self, index: usize) -> Option { [INFO] [stdout] 133 + pub fn get(&self, index: usize) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/user_agent_parser.rs:98:13 [INFO] [stdout] | [INFO] [stdout] 98 | my_filters: my_filters, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `my_filters` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/lib.rs:73:27 [INFO] [stdout] | [INFO] [stdout] 73 | const DEFAULT_FILE_NAME: &'static str = "browscap_sorted.csv"; [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: unneeded `return` statement [INFO] [stdout] --> src/capabilities.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | return u_str.map(|x| x.as_str()); [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] 44 - return u_str.map(|x| x.as_str()); [INFO] [stdout] 44 + u_str.map(|x| x.as_str()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/capabilities.rs:87:38 [INFO] [stdout] | [INFO] [stdout] 87 | pub fn init_default_capa<'a>(fields: &Vec<&'static BrowsCapField>) -> &'a Capabilities { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 87 - pub fn init_default_capa<'a>(fields: &Vec<&'static BrowsCapField>) -> &'a Capabilities { [INFO] [stdout] 87 + pub fn init_default_capa<'a>(fields: &[&'static BrowsCapField]) -> &'a Capabilities { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/capabilities.rs:105:28 [INFO] [stdout] | [INFO] [stdout] 105 | pub fn init_wild_card_capa<'a>(fields: &'a Vec<&'static BrowsCapField>) -> Arc { [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] 105 - pub fn init_wild_card_capa<'a>(fields: &'a Vec<&'static BrowsCapField>) -> Arc { [INFO] [stdout] 105 + pub fn init_wild_card_capa(fields: &Vec<&'static BrowsCapField>) -> Arc { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/mapper.rs:32:37 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn get_value(&self, values: &Vec, field: &BrowsCapField) -> Option { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 32 - pub fn get_value(&self, values: &Vec, field: &BrowsCapField) -> Option { [INFO] [stdout] 32 + pub fn get_value(&self, values: &[Ustr], field: &BrowsCapField) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/mapper.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | / match index { [INFO] [stdout] 35 | | None => None, [INFO] [stdout] 36 | | Some(i) => Some(values[*i]), [INFO] [stdout] 37 | | } [INFO] [stdout] | |_________^ help: try: `index.map(|i| values[*i])` [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: unneeded `return` statement [INFO] [stdout] --> src/mapper.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | return 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] 46 - return None; [INFO] [stdout] 46 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.my_prefix` after checking its variant with `is_none` [INFO] [stdout] --> src/rule.rs:53:59 [INFO] [stdout] | [INFO] [stdout] 51 | if self.my_prefix.is_none() { [INFO] [stdout] | --------------------------- help: try: `if let Some() = &self.my_prefix` [INFO] [stdout] 52 | start = 0; [INFO] [stdout] 53 | } else if searchable_string::starts_with(value, &*self.my_prefix.as_ref().unwrap().clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [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: called `unwrap` on `self.my_prefix` after checking its variant with `is_none` [INFO] [stdout] --> src/rule.rs:55:21 [INFO] [stdout] | [INFO] [stdout] 51 | if self.my_prefix.is_none() { [INFO] [stdout] | --------------------------- help: try: `if let Some() = &self.my_prefix` [INFO] [stdout] ... [INFO] [stdout] 55 | start = self.my_prefix.as_ref().unwrap().get_length() as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [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: called `unwrap` on `self.my_postfix` after checking its variant with `is_none` [INFO] [stdout] --> src/rule.rs:63:35 [INFO] [stdout] | [INFO] [stdout] 61 | if self.my_postfix.is_none() { [INFO] [stdout] | ---------------------------- help: try: `if let Some() = &self.my_postfix` [INFO] [stdout] 62 | end = value.get_size() as i32 - 1; [INFO] [stdout] 63 | } else if value.ends_with(self.my_postfix.as_ref().unwrap()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [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: called `unwrap` on `self.my_postfix` after checking its variant with `is_none` [INFO] [stdout] --> src/rule.rs:65:47 [INFO] [stdout] | [INFO] [stdout] 61 | if self.my_postfix.is_none() { [INFO] [stdout] | ---------------------------- help: try: `if let Some() = &self.my_postfix` [INFO] [stdout] ... [INFO] [stdout] 65 | value.get_size() as i32 - 1 - self.my_postfix.as_ref().unwrap().get_length() as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [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: returning the result of a `let` binding from a block [INFO] [stdout] --> src/rule.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 69 | let x = self.check_wild_cards(value, self.my_suffixes.clone(), start, end); [INFO] [stdout] | --------------------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 70 | [INFO] [stdout] 71 | x [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] 69 ~ [INFO] [stdout] 70 | [INFO] [stdout] 71 ~ self.check_wild_cards(value, self.my_suffixes.clone(), start, end) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/rule.rs:53:57 [INFO] [stdout] | [INFO] [stdout] 53 | } else if searchable_string::starts_with(value, &*self.my_prefix.as_ref().unwrap().clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&self.my_prefix.as_ref().unwrap().clone()` [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: unneeded `return` statement [INFO] [stdout] --> src/rule.rs:84:17 [INFO] [stdout] | [INFO] [stdout] 84 | return start == end + 1; [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] 84 - return start == end + 1; [INFO] [stdout] 84 + start == end + 1 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rule.rs:139:9 [INFO] [stdout] | [INFO] [stdout] 139 | / if let Some(suffixes) = &self.my_suffixes { [INFO] [stdout] 140 | | if !suffixes.is_empty() { [INFO] [stdout] 141 | | result.push('*'); [INFO] [stdout] 142 | | for sub in suffixes { [INFO] [stdout] ... | [INFO] [stdout] 147 | | } [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] 139 ~ if let Some(suffixes) = &self.my_suffixes [INFO] [stdout] 140 ~ && !suffixes.is_empty() { [INFO] [stdout] 141 | result.push('*'); [INFO] [stdout] ... [INFO] [stdout] 145 | } [INFO] [stdout] 146 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/rule.rs:164:12 [INFO] [stdout] | [INFO] [stdout] 164 | if self.my_prefix.as_ref().map_or(false, |item|item.requires(value)) { [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] 164 - if self.my_prefix.as_ref().map_or(false, |item|item.requires(value)) { [INFO] [stdout] 164 + if self.my_prefix.as_ref().is_some_and(|item|item.requires(value)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/rule.rs:167:12 [INFO] [stdout] | [INFO] [stdout] 167 | if self.my_postfix.as_ref().map_or(false, |item|item.requires(value)) { [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] 167 - if self.my_postfix.as_ref().map_or(false, |item|item.requires(value)) { [INFO] [stdout] 167 + if self.my_postfix.as_ref().is_some_and(|item|item.requires(value)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/rule.rs:209:22 [INFO] [stdout] | [INFO] [stdout] 209 | let has_prefix = !("*" == *first); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `("*" != *first)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/rule.rs:210:23 [INFO] [stdout] | [INFO] [stdout] 210 | let has_postfix = !("*" == *last); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `("*" != *last)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/rule.rs:217:34 [INFO] [stdout] | [INFO] [stdout] 217 | middle_parts.retain(|suffix| !(*suffix == "*")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `(*suffix != "*")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `cached` after checking its variant with `is_some` [INFO] [stdout] --> src/searchable_string.rs:63:20 [INFO] [stdout] | [INFO] [stdout] 62 | if cached.is_some() { [INFO] [stdout] | ------------------- help: try: `if let Some() = cached` [INFO] [stdout] 63 | return cached.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [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: it looks like you're manually copying between slices [INFO] [stdout] --> src/searchable_string.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | / for i in 0..count { [INFO] [stdout] 108 | | values[i] = self.my_buffer[i]; [INFO] [stdout] 109 | | } [INFO] [stdout] | |_________^ help: try replacing the loop by: `values[..count].copy_from_slice(&self.my_buffer[..count]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] = note: `#[warn(clippy::manual_memcpy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `cached` after checking its variant with `is_some` [INFO] [stdout] --> src/searchable_string.rs:118:16 [INFO] [stdout] | [INFO] [stdout] 117 | if cached.is_some() { [INFO] [stdout] | ------------------- help: try: `if let Some() = cached` [INFO] [stdout] 118 | return cached.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [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] --> src/searchable_string.rs:134:12 [INFO] [stdout] | [INFO] [stdout] 134 | if self.my_values.get(index).map_or(false, |v| *v) { [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] 134 - if self.my_values.get(index).map_or(false, |v| *v) { [INFO] [stdout] 134 + if self.my_values.get(index).is_some_and(|v| *v) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/searchable_string.rs:137:12 [INFO] [stdout] | [INFO] [stdout] 137 | if self.my_is_known.get(index).map_or(false, |v| *v) { [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] 137 - if self.my_is_known.get(index).map_or(false, |v| *v) { [INFO] [stdout] 137 + if self.my_is_known.get(index).is_some_and(|v| *v) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/file_parser.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | / for record_r in csv_reader.into_records() { [INFO] [stdout] 33 | | if let Ok(record) = record_r { [INFO] [stdout] 34 | | let rule_result = self.get_rule(record); [INFO] [stdout] 35 | | match rule_result { [INFO] [stdout] ... | [INFO] [stdout] 42 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/file_parser.rs:33:13 [INFO] [stdout] | [INFO] [stdout] 33 | / if let Ok(record) = record_r { [INFO] [stdout] 34 | | let rule_result = self.get_rule(record); [INFO] [stdout] 35 | | match rule_result { [INFO] [stdout] 36 | | Ok(rule) => { [INFO] [stdout] ... | [INFO] [stdout] 41 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 32 ~ for record in csv_reader.into_records().flatten() { [INFO] [stdout] 33 + let rule_result = self.get_rule(record); [INFO] [stdout] 34 + match rule_result { [INFO] [stdout] 35 + Ok(rule) => { [INFO] [stdout] 36 + self.rules.push(rule); [INFO] [stdout] 37 + } [INFO] [stdout] 38 + Err(_) => {} [INFO] [stdout] 39 + } [INFO] [stdout] 40 + } [INFO] [stdout] | [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] --> src/file_parser.rs:35:17 [INFO] [stdout] | [INFO] [stdout] 35 | / match rule_result { [INFO] [stdout] 36 | | Ok(rule) => { [INFO] [stdout] 37 | | self.rules.push(rule); [INFO] [stdout] ... | [INFO] [stdout] 40 | | } [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] 35 ~ if let Ok(rule) = rule_result { [INFO] [stdout] 36 + self.rules.push(rule); [INFO] [stdout] 37 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/file_parser.rs:69:25 [INFO] [stdout] | [INFO] [stdout] 69 | fn get_brows_cap_fields<'b>( [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/user_agent_parser.rs:114:9 [INFO] [stdout] | [INFO] [stdout] 114 | return crate::capabilities::DEFAULT_CAPABILITIES.get().unwrap(); [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] 114 - return crate::capabilities::DEFAULT_CAPABILITIES.get().unwrap(); [INFO] [stdout] 114 + crate::capabilities::DEFAULT_CAPABILITIES.get().unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/capabilities.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | return u_str.map(|x| x.as_str()); [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] 44 - return u_str.map(|x| x.as_str()); [INFO] [stdout] 44 + u_str.map(|x| x.as_str()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/capabilities.rs:87:38 [INFO] [stdout] | [INFO] [stdout] 87 | pub fn init_default_capa<'a>(fields: &Vec<&'static BrowsCapField>) -> &'a Capabilities { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 87 - pub fn init_default_capa<'a>(fields: &Vec<&'static BrowsCapField>) -> &'a Capabilities { [INFO] [stdout] 87 + pub fn init_default_capa<'a>(fields: &[&'static BrowsCapField]) -> &'a Capabilities { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/capabilities.rs:105:28 [INFO] [stdout] | [INFO] [stdout] 105 | pub fn init_wild_card_capa<'a>(fields: &'a Vec<&'static BrowsCapField>) -> Arc { [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] 105 - pub fn init_wild_card_capa<'a>(fields: &'a Vec<&'static BrowsCapField>) -> Arc { [INFO] [stdout] 105 + pub fn init_wild_card_capa(fields: &Vec<&'static BrowsCapField>) -> Arc { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/user_agent_parser.rs:139:29 [INFO] [stdout] | [INFO] [stdout] 139 | fn get_ordered_rules(rules: &mut Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 139 - fn get_ordered_rules(rules: &mut Vec) { [INFO] [stdout] 139 + fn get_ordered_rules(rules: &mut [Rule]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/mapper.rs:32:37 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn get_value(&self, values: &Vec, field: &BrowsCapField) -> Option { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 32 - pub fn get_value(&self, values: &Vec, field: &BrowsCapField) -> Option { [INFO] [stdout] 32 + pub fn get_value(&self, values: &[Ustr], field: &BrowsCapField) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/mapper.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | / match index { [INFO] [stdout] 35 | | None => None, [INFO] [stdout] 36 | | Some(i) => Some(values[*i]), [INFO] [stdout] 37 | | } [INFO] [stdout] | |_________^ help: try: `index.map(|i| values[*i])` [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: unneeded `return` statement [INFO] [stdout] --> src/mapper.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | return 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] 46 - return None; [INFO] [stdout] 46 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/filter.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 22 | / let filter = Filter { [INFO] [stdout] 23 | | filter_type, [INFO] [stdout] 24 | | my_mask, [INFO] [stdout] 25 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 26 | filter [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] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 22 ~ [INFO] [stdout] 23 ~ Filter { [INFO] [stdout] 24 + filter_type, [INFO] [stdout] 25 + my_mask, [INFO] [stdout] 26 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/filter.rs:35:43 [INFO] [stdout] | [INFO] [stdout] 35 | pub(crate) fn create_prefix_masker(rules: &Vec, pattern: Ustr) -> BitVec { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 - pub(crate) fn create_prefix_masker(rules: &Vec, pattern: Ustr) -> BitVec { [INFO] [stdout] 35 + pub(crate) fn create_prefix_masker(rules: &[Rule], pattern: Ustr) -> BitVec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/filter.rs:50:38 [INFO] [stdout] | [INFO] [stdout] 50 | pub fn create_contains_masker(rules: &Vec, pattern: Ustr) -> BitVec { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 50 - pub fn create_contains_masker(rules: &Vec, pattern: Ustr) -> BitVec { [INFO] [stdout] 50 + pub fn create_contains_masker(rules: &[Rule], pattern: Ustr) -> BitVec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/filter.rs:77:20 [INFO] [stdout] | [INFO] [stdout] 77 | if !(searchable_string.get_indices(literal).len() > 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(searchable_string.get_indices(literal).len() <= 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/filter.rs:64:14 [INFO] [stdout] | [INFO] [stdout] 64 | filters: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 64 - filters: &Vec, [INFO] [stdout] 64 + filters: &[Filter], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/filter.rs:77:22 [INFO] [stdout] | [INFO] [stdout] 77 | if !(searchable_string.get_indices(literal).len() > 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!searchable_string.get_indices(literal).is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/literal.rs:10:81 [INFO] [stdout] | [INFO] [stdout] 10 | pub static LITERAL_CACHE: LazyLock>> = LazyLock::new(|| DashMap::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `DashMap::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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/literal.rs:50:41 [INFO] [stdout] | [INFO] [stdout] 50 | pub(crate) fn matches(&self, value: &Vec, from: i32) -> bool { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 50 - pub(crate) fn matches(&self, value: &Vec, from: i32) -> bool { [INFO] [stdout] 50 + pub(crate) fn matches(&self, value: &[char], from: i32) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.my_prefix` after checking its variant with `is_none` [INFO] [stdout] --> src/rule.rs:53:59 [INFO] [stdout] | [INFO] [stdout] 51 | if self.my_prefix.is_none() { [INFO] [stdout] | --------------------------- help: try: `if let Some() = &self.my_prefix` [INFO] [stdout] 52 | start = 0; [INFO] [stdout] 53 | } else if searchable_string::starts_with(value, &*self.my_prefix.as_ref().unwrap().clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [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: called `unwrap` on `self.my_prefix` after checking its variant with `is_none` [INFO] [stdout] --> src/rule.rs:55:21 [INFO] [stdout] | [INFO] [stdout] 51 | if self.my_prefix.is_none() { [INFO] [stdout] | --------------------------- help: try: `if let Some() = &self.my_prefix` [INFO] [stdout] ... [INFO] [stdout] 55 | start = self.my_prefix.as_ref().unwrap().get_length() as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [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: called `unwrap` on `self.my_postfix` after checking its variant with `is_none` [INFO] [stdout] --> src/rule.rs:63:35 [INFO] [stdout] | [INFO] [stdout] 61 | if self.my_postfix.is_none() { [INFO] [stdout] | ---------------------------- help: try: `if let Some() = &self.my_postfix` [INFO] [stdout] 62 | end = value.get_size() as i32 - 1; [INFO] [stdout] 63 | } else if value.ends_with(self.my_postfix.as_ref().unwrap()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [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: called `unwrap` on `self.my_postfix` after checking its variant with `is_none` [INFO] [stdout] --> src/rule.rs:65:47 [INFO] [stdout] | [INFO] [stdout] 61 | if self.my_postfix.is_none() { [INFO] [stdout] | ---------------------------- help: try: `if let Some() = &self.my_postfix` [INFO] [stdout] ... [INFO] [stdout] 65 | value.get_size() as i32 - 1 - self.my_postfix.as_ref().unwrap().get_length() as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [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: returning the result of a `let` binding from a block [INFO] [stdout] --> src/rule.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 69 | let x = self.check_wild_cards(value, self.my_suffixes.clone(), start, end); [INFO] [stdout] | --------------------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 70 | [INFO] [stdout] 71 | x [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] 69 ~ [INFO] [stdout] 70 | [INFO] [stdout] 71 ~ self.check_wild_cards(value, self.my_suffixes.clone(), start, end) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/rule.rs:53:57 [INFO] [stdout] | [INFO] [stdout] 53 | } else if searchable_string::starts_with(value, &*self.my_prefix.as_ref().unwrap().clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&self.my_prefix.as_ref().unwrap().clone()` [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: unneeded `return` statement [INFO] [stdout] --> src/rule.rs:84:17 [INFO] [stdout] | [INFO] [stdout] 84 | return start == end + 1; [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] 84 - return start == end + 1; [INFO] [stdout] 84 + start == end + 1 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rule.rs:139:9 [INFO] [stdout] | [INFO] [stdout] 139 | / if let Some(suffixes) = &self.my_suffixes { [INFO] [stdout] 140 | | if !suffixes.is_empty() { [INFO] [stdout] 141 | | result.push('*'); [INFO] [stdout] 142 | | for sub in suffixes { [INFO] [stdout] ... | [INFO] [stdout] 147 | | } [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] 139 ~ if let Some(suffixes) = &self.my_suffixes [INFO] [stdout] 140 ~ && !suffixes.is_empty() { [INFO] [stdout] 141 | result.push('*'); [INFO] [stdout] ... [INFO] [stdout] 145 | } [INFO] [stdout] 146 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/rule.rs:164:12 [INFO] [stdout] | [INFO] [stdout] 164 | if self.my_prefix.as_ref().map_or(false, |item|item.requires(value)) { [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] 164 - if self.my_prefix.as_ref().map_or(false, |item|item.requires(value)) { [INFO] [stdout] 164 + if self.my_prefix.as_ref().is_some_and(|item|item.requires(value)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/rule.rs:167:12 [INFO] [stdout] | [INFO] [stdout] 167 | if self.my_postfix.as_ref().map_or(false, |item|item.requires(value)) { [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] 167 - if self.my_postfix.as_ref().map_or(false, |item|item.requires(value)) { [INFO] [stdout] 167 + if self.my_postfix.as_ref().is_some_and(|item|item.requires(value)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/rule.rs:209:22 [INFO] [stdout] | [INFO] [stdout] 209 | let has_prefix = !("*" == *first); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `("*" != *first)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/rule.rs:210:23 [INFO] [stdout] | [INFO] [stdout] 210 | let has_postfix = !("*" == *last); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `("*" != *last)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/rule.rs:217:34 [INFO] [stdout] | [INFO] [stdout] 217 | middle_parts.retain(|suffix| !(*suffix == "*")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `(*suffix != "*")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `cached` after checking its variant with `is_some` [INFO] [stdout] --> src/searchable_string.rs:63:20 [INFO] [stdout] | [INFO] [stdout] 62 | if cached.is_some() { [INFO] [stdout] | ------------------- help: try: `if let Some() = cached` [INFO] [stdout] 63 | return cached.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [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: it looks like you're manually copying between slices [INFO] [stdout] --> src/searchable_string.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | / for i in 0..count { [INFO] [stdout] 108 | | values[i] = self.my_buffer[i]; [INFO] [stdout] 109 | | } [INFO] [stdout] | |_________^ help: try replacing the loop by: `values[..count].copy_from_slice(&self.my_buffer[..count]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] = note: `#[warn(clippy::manual_memcpy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `cached` after checking its variant with `is_some` [INFO] [stdout] --> src/searchable_string.rs:118:16 [INFO] [stdout] | [INFO] [stdout] 117 | if cached.is_some() { [INFO] [stdout] | ------------------- help: try: `if let Some() = cached` [INFO] [stdout] 118 | return cached.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [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] --> src/searchable_string.rs:134:12 [INFO] [stdout] | [INFO] [stdout] 134 | if self.my_values.get(index).map_or(false, |v| *v) { [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] 134 - if self.my_values.get(index).map_or(false, |v| *v) { [INFO] [stdout] 134 + if self.my_values.get(index).is_some_and(|v| *v) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/searchable_string.rs:137:12 [INFO] [stdout] | [INFO] [stdout] 137 | if self.my_is_known.get(index).map_or(false, |v| *v) { [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] 137 - if self.my_is_known.get(index).map_or(false, |v| *v) { [INFO] [stdout] 137 + if self.my_is_known.get(index).is_some_and(|v| *v) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/searchable_string.rs:167:9 [INFO] [stdout] | [INFO] [stdout] 167 | assert_eq!(starts_with(&mut cache, &ab), true); [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] 167 - assert_eq!(starts_with(&mut cache, &ab), true); [INFO] [stdout] 167 + assert!(starts_with(&mut cache, &ab)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/searchable_string.rs:168:9 [INFO] [stdout] | [INFO] [stdout] 168 | assert_eq!(starts_with(&mut cache, &abc), false); [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] 168 - assert_eq!(starts_with(&mut cache, &abc), false); [INFO] [stdout] 168 + assert!(!starts_with(&mut cache, &abc)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/searchable_string.rs:170:9 [INFO] [stdout] | [INFO] [stdout] 170 | assert_eq!(starts_with(&mut cache, &abc), false); [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] 170 - assert_eq!(starts_with(&mut cache, &abc), false); [INFO] [stdout] 170 + assert!(!starts_with(&mut cache, &abc)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/searchable_string.rs:172:9 [INFO] [stdout] | [INFO] [stdout] 172 | assert_eq!(cache.ends_with(&abc), true); [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] 172 - assert_eq!(cache.ends_with(&abc), true); [INFO] [stdout] 172 + assert!(cache.ends_with(&abc)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/searchable_string.rs:173:9 [INFO] [stdout] | [INFO] [stdout] 173 | assert_eq!(cache.ends_with(&ab), false); [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] 173 - assert_eq!(cache.ends_with(&ab), false); [INFO] [stdout] 173 + assert!(!cache.ends_with(&ab)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/searchable_string.rs:175:9 [INFO] [stdout] | [INFO] [stdout] 175 | assert_eq!(cache.ends_with(&ab), false); [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] 175 - assert_eq!(cache.ends_with(&ab), false); [INFO] [stdout] 175 + assert!(!cache.ends_with(&ab)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/file_parser.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | / for record_r in csv_reader.into_records() { [INFO] [stdout] 33 | | if let Ok(record) = record_r { [INFO] [stdout] 34 | | let rule_result = self.get_rule(record); [INFO] [stdout] 35 | | match rule_result { [INFO] [stdout] ... | [INFO] [stdout] 42 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/file_parser.rs:33:13 [INFO] [stdout] | [INFO] [stdout] 33 | / if let Ok(record) = record_r { [INFO] [stdout] 34 | | let rule_result = self.get_rule(record); [INFO] [stdout] 35 | | match rule_result { [INFO] [stdout] 36 | | Ok(rule) => { [INFO] [stdout] ... | [INFO] [stdout] 41 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 32 ~ for record in csv_reader.into_records().flatten() { [INFO] [stdout] 33 + let rule_result = self.get_rule(record); [INFO] [stdout] 34 + match rule_result { [INFO] [stdout] 35 + Ok(rule) => { [INFO] [stdout] 36 + self.rules.push(rule); [INFO] [stdout] 37 + } [INFO] [stdout] 38 + Err(_) => {} [INFO] [stdout] 39 + } [INFO] [stdout] 40 + } [INFO] [stdout] | [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] --> src/file_parser.rs:35:17 [INFO] [stdout] | [INFO] [stdout] 35 | / match rule_result { [INFO] [stdout] 36 | | Ok(rule) => { [INFO] [stdout] 37 | | self.rules.push(rule); [INFO] [stdout] ... | [INFO] [stdout] 40 | | } [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] 35 ~ if let Ok(rule) = rule_result { [INFO] [stdout] 36 + self.rules.push(rule); [INFO] [stdout] 37 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/file_parser.rs:69:25 [INFO] [stdout] | [INFO] [stdout] 69 | fn get_brows_cap_fields<'b>( [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/user_agent_parser.rs:114:9 [INFO] [stdout] | [INFO] [stdout] 114 | return crate::capabilities::DEFAULT_CAPABILITIES.get().unwrap(); [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] 114 - return crate::capabilities::DEFAULT_CAPABILITIES.get().unwrap(); [INFO] [stdout] 114 + crate::capabilities::DEFAULT_CAPABILITIES.get().unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/user_agent_parser.rs:139:29 [INFO] [stdout] | [INFO] [stdout] 139 | fn get_ordered_rules(rules: &mut Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 139 - fn get_ordered_rules(rules: &mut Vec) { [INFO] [stdout] 139 + fn get_ordered_rules(rules: &mut [Rule]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/filter.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 22 | / let filter = Filter { [INFO] [stdout] 23 | | filter_type, [INFO] [stdout] 24 | | my_mask, [INFO] [stdout] 25 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 26 | filter [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] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 22 ~ [INFO] [stdout] 23 ~ Filter { [INFO] [stdout] 24 + filter_type, [INFO] [stdout] 25 + my_mask, [INFO] [stdout] 26 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/filter.rs:35:43 [INFO] [stdout] | [INFO] [stdout] 35 | pub(crate) fn create_prefix_masker(rules: &Vec, pattern: Ustr) -> BitVec { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 - pub(crate) fn create_prefix_masker(rules: &Vec, pattern: Ustr) -> BitVec { [INFO] [stdout] 35 + pub(crate) fn create_prefix_masker(rules: &[Rule], pattern: Ustr) -> BitVec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/filter.rs:50:38 [INFO] [stdout] | [INFO] [stdout] 50 | pub fn create_contains_masker(rules: &Vec, pattern: Ustr) -> BitVec { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 50 - pub fn create_contains_masker(rules: &Vec, pattern: Ustr) -> BitVec { [INFO] [stdout] 50 + pub fn create_contains_masker(rules: &[Rule], pattern: Ustr) -> BitVec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/filter.rs:77:20 [INFO] [stdout] | [INFO] [stdout] 77 | if !(searchable_string.get_indices(literal).len() > 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(searchable_string.get_indices(literal).len() <= 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/filter.rs:64:14 [INFO] [stdout] | [INFO] [stdout] 64 | filters: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 64 - filters: &Vec, [INFO] [stdout] 64 + filters: &[Filter], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/filter.rs:77:22 [INFO] [stdout] | [INFO] [stdout] 77 | if !(searchable_string.get_indices(literal).len() > 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!searchable_string.get_indices(literal).is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/literal.rs:10:81 [INFO] [stdout] | [INFO] [stdout] 10 | pub static LITERAL_CACHE: LazyLock>> = LazyLock::new(|| DashMap::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `DashMap::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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/literal.rs:50:41 [INFO] [stdout] | [INFO] [stdout] 50 | pub(crate) fn matches(&self, value: &Vec, from: i32) -> bool { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 50 - pub(crate) fn matches(&self, value: &Vec, from: i32) -> bool { [INFO] [stdout] 50 + pub(crate) fn matches(&self, value: &[char], from: i32) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/literal.rs:111:9 [INFO] [stdout] | [INFO] [stdout] 111 | assert_eq!(literal.matches(&search, 3), true); [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] 111 - assert_eq!(literal.matches(&search, 3), true); [INFO] [stdout] 111 + assert!(literal.matches(&search, 3)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/literal.rs:112:9 [INFO] [stdout] | [INFO] [stdout] 112 | assert_eq!(literal.matches(&search, 0), false); [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] 112 - assert_eq!(literal.matches(&search, 0), false); [INFO] [stdout] 112 + assert!(!literal.matches(&search, 0)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/literal.rs:113:9 [INFO] [stdout] | [INFO] [stdout] 113 | assert_eq!(literal.matches(&search, 5), false); [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] 113 - assert_eq!(literal.matches(&search, 5), false); [INFO] [stdout] 113 + assert!(!literal.matches(&search, 5)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/literal.rs:115:9 [INFO] [stdout] | [INFO] [stdout] 115 | assert_eq!(literal.matches(&search, 100), false); [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] 115 - assert_eq!(literal.matches(&search, 100), false); [INFO] [stdout] 115 + assert!(!literal.matches(&search, 100)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/literal.rs:118:9 [INFO] [stdout] | [INFO] [stdout] 118 | assert_eq!(joker.matches(&search, 3), true); [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] 118 - assert_eq!(joker.matches(&search, 3), true); [INFO] [stdout] 118 + assert!(joker.matches(&search, 3)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/literal.rs:119:9 [INFO] [stdout] | [INFO] [stdout] 119 | assert_eq!(joker.matches(&search, 0), false); [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] 119 - assert_eq!(joker.matches(&search, 0), false); [INFO] [stdout] 119 + assert!(!joker.matches(&search, 0)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/literal.rs:120:9 [INFO] [stdout] | [INFO] [stdout] 120 | assert_eq!(joker.matches(&search, 5), false); [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] 120 - assert_eq!(joker.matches(&search, 5), false); [INFO] [stdout] 120 + assert!(!joker.matches(&search, 5)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/literal.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | assert_eq!(literal.requires(Ustr::from("hello")), true); [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] 126 - assert_eq!(literal.requires(Ustr::from("hello")), true); [INFO] [stdout] 126 + assert!(literal.requires(Ustr::from("hello"))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/literal.rs:127:9 [INFO] [stdout] | [INFO] [stdout] 127 | assert_eq!(literal.requires(Ustr::from("hell")), true); [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] 127 - assert_eq!(literal.requires(Ustr::from("hell")), true); [INFO] [stdout] 127 + assert!(literal.requires(Ustr::from("hell"))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/literal.rs:128:9 [INFO] [stdout] | [INFO] [stdout] 128 | assert_eq!(literal.requires(Ustr::from("hello world")), false); [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] 128 - assert_eq!(literal.requires(Ustr::from("hello world")), false); [INFO] [stdout] 128 + assert!(!literal.requires(Ustr::from("hello world"))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/literal.rs:129:9 [INFO] [stdout] | [INFO] [stdout] 129 | assert_eq!(literal.requires(Ustr::from("morning world")), false); [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] 129 - assert_eq!(literal.requires(Ustr::from("morning world")), false); [INFO] [stdout] 129 + assert!(!literal.requires(Ustr::from("morning world"))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/literal.rs:130:9 [INFO] [stdout] | [INFO] [stdout] 130 | assert_eq!(literal.requires(Ustr::from("helloworld")), false); [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] 130 - assert_eq!(literal.requires(Ustr::from("helloworld")), false); [INFO] [stdout] 130 + assert!(!literal.requires(Ustr::from("helloworld"))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/lib.rs:166:9 [INFO] [stdout] | [INFO] [stdout] 166 | / let mut my_fields:Vec<&'static BrowsCapField>=Vec::new(); [INFO] [stdout] 167 | | my_fields.push(&BROWSER); [INFO] [stdout] 168 | | my_fields.push(&IS_BETA); [INFO] [stdout] 169 | | my_fields.push(&PLATFORM); [INFO] [stdout] | |__________________________________^ help: consider using the `vec![]` macro: `let my_fields: Vec<&'static BrowsCapField> = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `bitset_base64` is never used [INFO] [stdout] --> tests/bitvec_test.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 9 | pub fn bitset_base64(bit_set: &BitVec) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> tests/bitvec_test.rs:11:24 [INFO] [stdout] | [INFO] [stdout] 11 | let byte_len = (bit_len + 7) / 8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `bit_len.div_ceil(8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `log::debug` [INFO] [stdout] --> tests/file_batch_ua_test.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | use log::debug; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Read` [INFO] [stdout] --> tests/file_batch_ua_test.rs:6:46 [INFO] [stdout] | [INFO] [stdout] 6 | use std::io::{stdin, BufRead, BufReader, Read}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> tests/threads_test.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | / return ( [INFO] [stdout] 39 | | split.next().unwrap(), [INFO] [stdout] 40 | | split.next().unwrap(), [INFO] [stdout] 41 | | split.next().unwrap(), [INFO] [stdout] ... | [INFO] [stdout] 44 | | split.next().unwrap(), [INFO] [stdout] 45 | | ); [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] 38 ~ ( [INFO] [stdout] 39 + split.next().unwrap(), [INFO] [stdout] 40 + split.next().unwrap(), [INFO] [stdout] 41 + split.next().unwrap(), [INFO] [stdout] 42 + split.next().unwrap(), [INFO] [stdout] 43 + split.next().unwrap(), [INFO] [stdout] 44 + split.next().unwrap(), [INFO] [stdout] 45 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `i` is assigned to, but never used [INFO] [stdout] --> tests/file_batch_ua_test.rs:17:13 [INFO] [stdout] | [INFO] [stdout] 17 | let mut i = 0; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_i` instead [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `time` [INFO] [stdout] --> tests/file_batch_ua_test.rs:31:17 [INFO] [stdout] | [INFO] [stdout] 31 | let time=timer.elapsed(); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_time` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `i` is never read [INFO] [stdout] --> tests/file_batch_ua_test.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | i += 1; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `i` is assigned to, but never used [INFO] [stdout] --> tests/file_batch_ua_test.rs:74:13 [INFO] [stdout] | [INFO] [stdout] 74 | let mut i = 0; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_i` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `i` is never read [INFO] [stdout] --> tests/file_batch_ua_test.rs:76:13 [INFO] [stdout] | [INFO] [stdout] 76 | i += 1; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> tests/single_ua_test.rs:18:33 [INFO] [stdout] | [INFO] [stdout] 18 | println!("{}", e.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `i` is used as a loop counter [INFO] [stdout] --> tests/file_batch_ua_test.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | for line in reader.lines() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (i, line) in reader.lines().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> tests/single_ua_test.rs:36:33 [INFO] [stdout] | [INFO] [stdout] 36 | println!("{}", e.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `i` is used as a loop counter [INFO] [stdout] --> tests/file_batch_ua_test.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 75 | for line in reader.lines() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (i, line) in reader.lines().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 7.75s [INFO] running `Command { std: "docker" "inspect" "2bfc77ab043d5952ea87636efc47db65d32556eeb5a92bdd580dbb4c80153c88", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2bfc77ab043d5952ea87636efc47db65d32556eeb5a92bdd580dbb4c80153c88", kill_on_drop: false }` [INFO] [stdout] 2bfc77ab043d5952ea87636efc47db65d32556eeb5a92bdd580dbb4c80153c88