[INFO] fetching crate mir-extractor 1.0.2... [INFO] linting mir-extractor-1.0.2 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate mir-extractor 1.0.2 into /workspace/builds/worker-5-tc1/source [INFO] started tweaking crates.io crate mir-extractor 1.0.2 [INFO] removed 0 missing examples [INFO] removed 0 missing tests [INFO] finished tweaking crates.io crate mir-extractor 1.0.2 [INFO] tweaked toml for crates.io crate mir-extractor 1.0.2 written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate mir-extractor 1.0.2 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate mir-extractor 1.0.2 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 4d3db8b0a67323ffad0191e5c65a75ea30a18a5e40739b1216a293e0e3bc5ba1 [INFO] running `Command { std: "docker" "start" "-a" "4d3db8b0a67323ffad0191e5c65a75ea30a18a5e40739b1216a293e0e3bc5ba1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "4d3db8b0a67323ffad0191e5c65a75ea30a18a5e40739b1216a293e0e3bc5ba1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4d3db8b0a67323ffad0191e5c65a75ea30a18a5e40739b1216a293e0e3bc5ba1", kill_on_drop: false }` [INFO] [stdout] 4d3db8b0a67323ffad0191e5c65a75ea30a18a5e40739b1216a293e0e3bc5ba1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 49b3b180e32807cfdfe7b4e096ede1ad3f168f79591e95d8e0aed8aa60cc5d50 [INFO] running `Command { std: "docker" "start" "-a" "49b3b180e32807cfdfe7b4e096ede1ad3f168f79591e95d8e0aed8aa60cc5d50", kill_on_drop: false }` [INFO] [stderr] Compiling quote v1.0.41 [INFO] [stderr] Compiling proc-macro2 v1.0.101 [INFO] [stderr] Compiling unicode-ident v1.0.19 [INFO] [stderr] Compiling serde_json v1.0.145 [INFO] [stderr] Checking regex-automata v0.4.11 [INFO] [stderr] Compiling zerocopy v0.8.27 [INFO] [stderr] Checking anstream v0.6.21 [INFO] [stderr] Checking indexmap v2.11.4 [INFO] [stderr] Compiling camino v1.2.1 [INFO] [stderr] Checking clap_builder v4.5.48 [INFO] [stderr] Checking crypto-common v0.1.6 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Checking semver v1.0.27 [INFO] [stderr] Compiling mir-extractor v1.0.2 (/opt/rustwide/workdir) [INFO] [stderr] Compiling syn v2.0.106 [INFO] [stderr] Checking sha2 v0.10.9 [INFO] [stderr] Checking sysinfo v0.30.13 [INFO] [stderr] Checking rustix v1.1.2 [INFO] [stderr] Checking predicates v3.1.3 [INFO] [stderr] Checking getrandom v0.3.3 [INFO] [stderr] Checking wait-timeout v0.2.1 [INFO] [stderr] Checking is-terminal v0.4.17 [INFO] [stderr] Checking regex v1.11.3 [INFO] [stderr] Checking bstr v1.12.0 [INFO] [stderr] Checking tempfile v3.23.0 [INFO] [stderr] Checking assert_cmd v2.0.17 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling zerocopy-derive v0.8.27 [INFO] [stderr] Compiling clap_derive v4.5.47 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking clap v4.5.48 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking toml_datetime v0.6.11 [INFO] [stderr] Checking serde_spanned v0.6.9 [INFO] [stderr] Checking cargo-platform v0.1.9 [INFO] [stderr] Checking serde_yaml v0.9.34+deprecated [INFO] [stderr] Checking tinytemplate v1.2.1 [INFO] [stderr] Checking cargo_metadata v0.18.1 [INFO] [stderr] Checking toml_edit v0.22.27 [INFO] [stderr] Checking half v2.7.1 [INFO] [stderr] Checking ciborium-ll v0.2.2 [INFO] [stderr] Checking ciborium v0.2.2 [INFO] [stderr] Checking criterion v0.5.1 [INFO] [stderr] Checking toml v0.8.23 [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/dataflow/cfg.rs:448:5 [INFO] [stdout] | [INFO] [stdout] 448 | / fn dfs_paths( [INFO] [stdout] 449 | | &self, [INFO] [stdout] 450 | | current_block: &str, [INFO] [stdout] 451 | | current_path: &mut Vec, [INFO] [stdout] ... | [INFO] [stdout] 456 | | max_paths: usize, [INFO] [stdout] 457 | | ) { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/dataflow/closure.rs:124:14 [INFO] [stdout] | [INFO] [stdout] 124 | .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/dataflow/closure.rs:274:25 [INFO] [stdout] | [INFO] [stdout] 274 | rhs[5..].trim() [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/closure.rs:273:38 [INFO] [stdout] | [INFO] [stdout] 273 | let source_var = if rhs.starts_with("&mut ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 273 ~ let source_var = if let Some() = rhs.strip_prefix("&mut ") { [INFO] [stdout] 274 ~ .trim() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/dataflow/closure.rs:277:56 [INFO] [stdout] | [INFO] [stdout] 277 | } else if rhs.starts_with("copy ") { [INFO] [stdout] | ________________________________________________________^ [INFO] [stdout] 278 | | rhs[5..].trim() [INFO] [stdout] 279 | | } else if rhs.starts_with("move ") { [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/dataflow/closure.rs:279:56 [INFO] [stdout] | [INFO] [stdout] 279 | } else if rhs.starts_with("move ") { [INFO] [stdout] | ________________________________________________________^ [INFO] [stdout] 280 | | rhs[5..].trim() [INFO] [stdout] 281 | | } else { [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: stripping a prefix manually [INFO] [stdout] --> src/dataflow/closure.rs:276:25 [INFO] [stdout] | [INFO] [stdout] 276 | rhs[1..].trim() [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/closure.rs:275:28 [INFO] [stdout] | [INFO] [stdout] 275 | } else if rhs.starts_with("&") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 275 ~ } else if let Some() = rhs.strip_prefix("&") { [INFO] [stdout] 276 ~ .trim() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/dataflow/closure.rs:278:25 [INFO] [stdout] | [INFO] [stdout] 278 | rhs[5..].trim() [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/closure.rs:277:28 [INFO] [stdout] | [INFO] [stdout] 277 | } else if rhs.starts_with("copy ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 277 ~ } else if let Some() = rhs.strip_prefix("copy ") { [INFO] [stdout] 278 ~ .trim() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/dataflow/closure.rs:280:25 [INFO] [stdout] | [INFO] [stdout] 280 | rhs[5..].trim() [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/closure.rs:279:28 [INFO] [stdout] | [INFO] [stdout] 279 | } else if rhs.starts_with("move ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 279 ~ } else if let Some() = rhs.strip_prefix("move ") { [INFO] [stdout] 280 ~ .trim() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/dataflow/closure.rs:485:13 [INFO] [stdout] | [INFO] [stdout] 485 | trimmed[5..].trim().to_string() [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/closure.rs:484:9 [INFO] [stdout] | [INFO] [stdout] 484 | if trimmed.starts_with("move ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 484 ~ if let Some() = trimmed.strip_prefix("move ") { [INFO] [stdout] 485 ~ .trim().to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/dataflow/closure.rs:484:41 [INFO] [stdout] | [INFO] [stdout] 484 | if trimmed.starts_with("move ") { [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 485 | | trimmed[5..].trim().to_string() [INFO] [stdout] 486 | | } else if trimmed.starts_with("&mut ") { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/dataflow/closure.rs:486:48 [INFO] [stdout] | [INFO] [stdout] 486 | } else if trimmed.starts_with("&mut ") { [INFO] [stdout] | ________________________________________________^ [INFO] [stdout] 487 | | trimmed[5..].trim().to_string() [INFO] [stdout] 488 | | } else if trimmed.starts_with('&') { [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: stripping a prefix manually [INFO] [stdout] --> src/dataflow/closure.rs:487:13 [INFO] [stdout] | [INFO] [stdout] 487 | trimmed[5..].trim().to_string() [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/closure.rs:486:16 [INFO] [stdout] | [INFO] [stdout] 486 | } else if trimmed.starts_with("&mut ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 486 ~ } else if let Some() = trimmed.strip_prefix("&mut ") { [INFO] [stdout] 487 ~ .trim().to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/dataflow/closure.rs:489:13 [INFO] [stdout] | [INFO] [stdout] 489 | trimmed[1..].trim().to_string() [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/closure.rs:488:16 [INFO] [stdout] | [INFO] [stdout] 488 | } else if trimmed.starts_with('&') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 488 ~ } else if let Some() = trimmed.strip_prefix('&') { [INFO] [stdout] 489 ~ .trim().to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/dataflow/closure.rs:540:51 [INFO] [stdout] | [INFO] [stdout] 540 | pub fn parse_closure_creation(statement: &str) -> Option<(String, String, Vec<(String, String)>)> { [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: stripping a prefix manually [INFO] [stdout] --> src/dataflow/closure.rs:631:21 [INFO] [stdout] | [INFO] [stdout] 631 | closure_arg[5..].trim().to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/closure.rs:630:35 [INFO] [stdout] | [INFO] [stdout] 630 | let closure_var = if closure_arg.starts_with("move ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 630 ~ let closure_var = if let Some() = closure_arg.strip_prefix("move ") { [INFO] [stdout] 631 ~ .trim().to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `dataflow::field::FieldPath` [INFO] [stdout] --> src/dataflow/field.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 48 | / pub fn to_string(&self) -> String { [INFO] [stdout] 49 | | if self.indices.is_empty() { [INFO] [stdout] 50 | | self.base_var.clone() [INFO] [stdout] 51 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 60 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `dataflow::field::FieldPath` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/dataflow/field.rs:382:26 [INFO] [stdout] | [INFO] [stdout] 382 | clean_base = &clean_base[1..clean_base.len() - 1].trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `clean_base[1..clean_base.len() - 1].trim()` [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: stripping a prefix manually [INFO] [stdout] --> src/dataflow/field.rs:386:13 [INFO] [stdout] | [INFO] [stdout] 386 | clean_base[1..].trim().to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/field.rs:385:24 [INFO] [stdout] | [INFO] [stdout] 385 | let base_var = if clean_base.starts_with('*') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 385 ~ let base_var = if let Some() = clean_base.strip_prefix('*') { [INFO] [stdout] 386 ~ .trim().to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/dataflow/field.rs:582:28 [INFO] [stdout] | [INFO] [stdout] 582 | let rest = &expr[prefix.len()..]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/field.rs:581:13 [INFO] [stdout] | [INFO] [stdout] 581 | if expr.starts_with(prefix) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 581 ~ if let Some(rest) = expr.strip_prefix(prefix) { [INFO] [stdout] 582 ~ return extract_base_var(rest); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/dataflow/path_sensitive.rs:333:5 [INFO] [stdout] | [INFO] [stdout] 333 | / fn process_block_field_sensitive( [INFO] [stdout] 334 | | &self, [INFO] [stdout] 335 | | block: &BasicBlock, [INFO] [stdout] 336 | | field_map: &mut FieldTaintMap, [INFO] [stdout] ... | [INFO] [stdout] 341 | | alias_map: &mut HashMap, [INFO] [stdout] 342 | | ) { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/dataflow/path_sensitive.rs:404:5 [INFO] [stdout] | [INFO] [stdout] 404 | / fn process_statement_field_sensitive( [INFO] [stdout] 405 | | &self, [INFO] [stdout] 406 | | block_id: &str, [INFO] [stdout] 407 | | statement: &str, [INFO] [stdout] ... | [INFO] [stdout] 413 | | alias_map: &mut HashMap, [INFO] [stdout] 414 | | ) { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/dataflow/path_sensitive.rs:420:30 [INFO] [stdout] | [INFO] [stdout] 420 | let source = rhs[11..].trim(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/path_sensitive.rs:419:13 [INFO] [stdout] | [INFO] [stdout] 419 | if rhs.starts_with("deref_copy ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 419 ~ if let Some() = rhs.strip_prefix("deref_copy ") { [INFO] [stdout] 420 ~ let source = .trim(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/dataflow/path_sensitive.rs:544:21 [INFO] [stdout] | [INFO] [stdout] 543 | let t = Self::get_field_taint_state(field_map, &var); [INFO] [stdout] | ----------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 544 | t [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] 543 ~ [INFO] [stdout] 544 ~ Self::get_field_taint_state(field_map, &var) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/dataflow/path_sensitive.rs:804:28 [INFO] [stdout] | [INFO] [stdout] 804 | if heuristic_methods.iter().any(|m| func_name_short == *m) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `heuristic_methods.contains(&func_name_short)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] = note: `#[warn(clippy::manual_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/dataflow/path_sensitive.rs:838:24 [INFO] [stdout] | [INFO] [stdout] 838 | if param_to_param_methods.iter().any(|m| func_name_short == *m) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `param_to_param_methods.contains(&func_name_short)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1000:5 [INFO] [stdout] | [INFO] [stdout] 1000 | / fn process_terminator_field_sensitive( [INFO] [stdout] 1001 | | &self, [INFO] [stdout] 1002 | | _block_id: &str, [INFO] [stdout] 1003 | | _statements: &[String], [INFO] [stdout] ... | [INFO] [stdout] 1010 | | _alias_map: &mut HashMap, [INFO] [stdout] 1011 | | ) { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1061:23 [INFO] [stdout] | [INFO] [stdout] 1061 | let var = expr[5..] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1060:9 [INFO] [stdout] | [INFO] [stdout] 1060 | if expr.starts_with("move ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 1060 ~ if let Some() = expr.strip_prefix("move ") { [INFO] [stdout] 1061 ~ let var = [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1071:23 [INFO] [stdout] | [INFO] [stdout] 1071 | let var = expr[5..] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1070:9 [INFO] [stdout] | [INFO] [stdout] 1070 | if expr.starts_with("copy ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 1070 ~ if let Some() = expr.strip_prefix("copy ") { [INFO] [stdout] 1071 ~ let var = [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1083:23 [INFO] [stdout] | [INFO] [stdout] 1083 | let var = expr[5..] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1082:9 [INFO] [stdout] | [INFO] [stdout] 1082 | if expr.starts_with("&mut ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 1082 ~ if let Some() = expr.strip_prefix("&mut ") { [INFO] [stdout] 1083 ~ let var = [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1093:23 [INFO] [stdout] | [INFO] [stdout] 1093 | let var = expr[1..] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1092:9 [INFO] [stdout] | [INFO] [stdout] 1092 | if expr.starts_with('&') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 1092 ~ if let Some() = expr.strip_prefix('&') { [INFO] [stdout] 1093 ~ let var = [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1155:42 [INFO] [stdout] | [INFO] [stdout] 1155 | if let Ok(idx) = field_expr[4..].parse::() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1152:21 [INFO] [stdout] | [INFO] [stdout] 1152 | if field_expr.starts_with("(_1.") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 1152 ~ if let Some() = field_expr.strip_prefix("(_1.") { [INFO] [stdout] 1153 | // Convert (_1.0 to ((*_1).0) [INFO] [stdout] 1154 | // field_expr is "(_1.0" [INFO] [stdout] 1155 ~ if let Ok(idx) = .parse::() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1320:48 [INFO] [stdout] | [INFO] [stdout] 1320 | if clean_expr.starts_with("&mut ") { [INFO] [stdout] | ________________________________________________^ [INFO] [stdout] 1321 | | clean_expr = &clean_expr[5..].trim(); [INFO] [stdout] 1322 | | } else if clean_expr.starts_with("move ") { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1322:55 [INFO] [stdout] | [INFO] [stdout] 1322 | } else if clean_expr.starts_with("move ") { [INFO] [stdout] | _______________________________________________________^ [INFO] [stdout] 1323 | | clean_expr = &clean_expr[5..].trim(); [INFO] [stdout] 1324 | | } else if clean_expr.starts_with("copy ") { [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] --> src/dataflow/path_sensitive.rs:1322:55 [INFO] [stdout] | [INFO] [stdout] 1322 | } else if clean_expr.starts_with("move ") { [INFO] [stdout] | _______________________________________________________^ [INFO] [stdout] 1323 | | clean_expr = &clean_expr[5..].trim(); [INFO] [stdout] 1324 | | } else if clean_expr.starts_with("copy ") { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1324:55 [INFO] [stdout] | [INFO] [stdout] 1324 | } else if clean_expr.starts_with("copy ") { [INFO] [stdout] | _______________________________________________________^ [INFO] [stdout] 1325 | | clean_expr = &clean_expr[5..].trim(); [INFO] [stdout] 1326 | | } else if clean_expr.starts_with("&") { [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1321:30 [INFO] [stdout] | [INFO] [stdout] 1321 | clean_expr = &clean_expr[5..].trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `clean_expr[5..].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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1323:30 [INFO] [stdout] | [INFO] [stdout] 1323 | clean_expr = &clean_expr[5..].trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `clean_expr[5..].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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1325:30 [INFO] [stdout] | [INFO] [stdout] 1325 | clean_expr = &clean_expr[5..].trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `clean_expr[5..].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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1327:30 [INFO] [stdout] | [INFO] [stdout] 1327 | clean_expr = &clean_expr[1..].trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `clean_expr[1..].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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1329:30 [INFO] [stdout] | [INFO] [stdout] 1329 | clean_expr = &clean_expr[11..].trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `clean_expr[11..].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: this `if` has identical blocks [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1366:48 [INFO] [stdout] | [INFO] [stdout] 1366 | if clean_expr.starts_with("&mut ") { [INFO] [stdout] | ________________________________________________^ [INFO] [stdout] 1367 | | clean_expr = &clean_expr[5..].trim(); [INFO] [stdout] 1368 | | } else if clean_expr.starts_with("move ") { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1368:55 [INFO] [stdout] | [INFO] [stdout] 1368 | } else if clean_expr.starts_with("move ") { [INFO] [stdout] | _______________________________________________________^ [INFO] [stdout] 1369 | | clean_expr = &clean_expr[5..].trim(); [INFO] [stdout] 1370 | | } else if clean_expr.starts_with("copy ") { [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] --> src/dataflow/path_sensitive.rs:1368:55 [INFO] [stdout] | [INFO] [stdout] 1368 | } else if clean_expr.starts_with("move ") { [INFO] [stdout] | _______________________________________________________^ [INFO] [stdout] 1369 | | clean_expr = &clean_expr[5..].trim(); [INFO] [stdout] 1370 | | } else if clean_expr.starts_with("copy ") { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1370:55 [INFO] [stdout] | [INFO] [stdout] 1370 | } else if clean_expr.starts_with("copy ") { [INFO] [stdout] | _______________________________________________________^ [INFO] [stdout] 1371 | | clean_expr = &clean_expr[5..].trim(); [INFO] [stdout] 1372 | | } else if clean_expr.starts_with("&") { [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1367:30 [INFO] [stdout] | [INFO] [stdout] 1367 | clean_expr = &clean_expr[5..].trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `clean_expr[5..].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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1369:30 [INFO] [stdout] | [INFO] [stdout] 1369 | clean_expr = &clean_expr[5..].trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `clean_expr[5..].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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1371:30 [INFO] [stdout] | [INFO] [stdout] 1371 | clean_expr = &clean_expr[5..].trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `clean_expr[5..].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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1373:30 [INFO] [stdout] | [INFO] [stdout] 1373 | clean_expr = &clean_expr[1..].trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `clean_expr[1..].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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1375:30 [INFO] [stdout] | [INFO] [stdout] 1375 | clean_expr = &clean_expr[11..].trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `clean_expr[11..].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: you seem to want to iterate on a map's values [INFO] [stdout] --> src/dataflow/taint.rs:110:35 [INFO] [stdout] | [INFO] [stdout] 110 | for (_block_id, block) in &self.blocks { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 110 - for (_block_id, block) in &self.blocks { [INFO] [stdout] 110 + for block in self.blocks.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SourceRegistry` [INFO] [stdout] --> src/dataflow/taint.rs:213:5 [INFO] [stdout] | [INFO] [stdout] 213 | / pub fn new() -> Self { [INFO] [stdout] 214 | | Self { [INFO] [stdout] 215 | | patterns: vec![ [INFO] [stdout] 216 | | SourcePattern { [INFO] [stdout] ... | [INFO] [stdout] 231 | | } [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] 212 + impl Default for SourceRegistry { [INFO] [stdout] 213 + fn default() -> Self { [INFO] [stdout] 214 + Self::new() [INFO] [stdout] 215 + } [INFO] [stdout] 216 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SinkRegistry` [INFO] [stdout] --> src/dataflow/taint.rs:271:5 [INFO] [stdout] | [INFO] [stdout] 271 | / pub fn new() -> Self { [INFO] [stdout] 272 | | Self { [INFO] [stdout] 273 | | patterns: vec![ [INFO] [stdout] 274 | | SinkPattern { [INFO] [stdout] ... | [INFO] [stdout] 296 | | } [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] 270 + impl Default for SinkRegistry { [INFO] [stdout] 271 + fn default() -> Self { [INFO] [stdout] 272 + Self::new() [INFO] [stdout] 273 + } [INFO] [stdout] 274 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SanitizerRegistry` [INFO] [stdout] --> src/dataflow/taint.rs:345:5 [INFO] [stdout] | [INFO] [stdout] 345 | / pub fn new() -> Self { [INFO] [stdout] 346 | | Self { [INFO] [stdout] 347 | | patterns: vec![ [INFO] [stdout] 348 | | SanitizerPattern { [INFO] [stdout] ... | [INFO] [stdout] 363 | | } [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] 344 + impl Default for SanitizerRegistry { [INFO] [stdout] 345 + fn default() -> Self { [INFO] [stdout] 346 + Self::new() [INFO] [stdout] 347 + } [INFO] [stdout] 348 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `TaintAnalysis` [INFO] [stdout] --> src/dataflow/taint.rs:403:5 [INFO] [stdout] | [INFO] [stdout] 403 | / pub fn new() -> Self { [INFO] [stdout] 404 | | Self { [INFO] [stdout] 405 | | source_registry: SourceRegistry::new(), [INFO] [stdout] 406 | | sink_registry: SinkRegistry::new(), [INFO] [stdout] ... | [INFO] [stdout] 409 | | } [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] 402 + impl Default for TaintAnalysis { [INFO] [stdout] 403 + fn default() -> Self { [INFO] [stdout] 404 + Self::new() [INFO] [stdout] 405 + } [INFO] [stdout] 406 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/dataflow/taint.rs:520:22 [INFO] [stdout] | [INFO] [stdout] 520 | .or_insert_with(HashSet::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's keys [INFO] [stdout] --> src/interprocedural.rs:484:30 [INFO] [stdout] | [INFO] [stdout] 484 | for (name, _) in nodes { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 484 - for (name, _) in nodes { [INFO] [stdout] 484 + for name in nodes.keys() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/interprocedural.rs:1297:17 [INFO] [stdout] | [INFO] [stdout] 1297 | s.sink_parameters.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.sink_parameters.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: unnecessary use of `get(source_func).is_some()` [INFO] [stdout] --> src/interprocedural.rs:1398:42 [INFO] [stdout] | [INFO] [stdout] 1398 | if self.call_graph.nodes.get(source_func).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains_key(source_func)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] = note: `#[warn(clippy::unnecessary_get_then_check)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/prototypes.rs:342:58 [INFO] [stdout] | [INFO] [stdout] 342 | if let Some(result_var) = line[..eq_pos].trim().split_whitespace().last() { [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/prototypes.rs:534:13 [INFO] [stdout] | [INFO] [stdout] 534 | / lowered.find(pattern).map_or(false, |idx| { [INFO] [stdout] 535 | | idx < first_paren && pattern_outside_quotes(&assignment.rhs, idx) [INFO] [stdout] 536 | | }) [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] 534 - lowered.find(pattern).map_or(false, |idx| { [INFO] [stdout] 534 + lowered.find(pattern).is_some_and(|idx| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/prototypes.rs:642:14 [INFO] [stdout] | [INFO] [stdout] 642 | .or_insert_with(Vec::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/prototypes.rs:658:33 [INFO] [stdout] | [INFO] [stdout] 658 | findings.entry(trimmed).or_insert_with(Vec::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Exploitability` which implements the `Copy` trait [INFO] [stdout] --> src/rules/advanced_async.rs:173:49 [INFO] [stdout] | [INFO] [stdout] 173 | ... exploitability: self.metadata.exploitability.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.metadata.exploitability` [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 `Exploitability` which implements the `Copy` trait [INFO] [stdout] --> src/rules/advanced_async.rs:353:49 [INFO] [stdout] | [INFO] [stdout] 353 | ... exploitability: self.metadata.exploitability.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.metadata.exploitability` [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 `Exploitability` which implements the `Copy` trait [INFO] [stdout] --> src/rules/advanced_async.rs:534:45 [INFO] [stdout] | [INFO] [stdout] 534 | ... exploitability: self.metadata.exploitability.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.metadata.exploitability` [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 `Exploitability` which implements the `Copy` trait [INFO] [stdout] --> src/rules/advanced_input.rs:153:49 [INFO] [stdout] | [INFO] [stdout] 153 | ... exploitability: self.metadata.exploitability.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.metadata.exploitability` [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 `Exploitability` which implements the `Copy` trait [INFO] [stdout] --> src/rules/advanced_input.rs:313:29 [INFO] [stdout] | [INFO] [stdout] 313 | exploitability: self.metadata.exploitability.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.metadata.exploitability` [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 `Exploitability` which implements the `Copy` trait [INFO] [stdout] --> src/rules/advanced_input.rs:458:49 [INFO] [stdout] | [INFO] [stdout] 458 | ... exploitability: self.metadata.exploitability.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.metadata.exploitability` [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 `Exploitability` which implements the `Copy` trait [INFO] [stdout] --> src/rules/advanced_input.rs:616:53 [INFO] [stdout] | [INFO] [stdout] 616 | ... exploitability: self.metadata.exploitability.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.metadata.exploitability` [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 `Exploitability` which implements the `Copy` trait [INFO] [stdout] --> src/rules/advanced_memory.rs:169:37 [INFO] [stdout] | [INFO] [stdout] 169 | exploitability: self.metadata.exploitability.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.metadata.exploitability` [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/rules/advanced_memory.rs:459:29 [INFO] [stdout] | [INFO] [stdout] 459 | if align > 1 && (event.value % align as u128 != 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!event.value.is_multiple_of(align as u128)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `CrateWideAllowRule` [INFO] [stdout] --> src/rules/code_quality.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | / pub fn new() -> Self { [INFO] [stdout] 33 | | Self { [INFO] [stdout] 34 | | metadata: RuleMetadata { [INFO] [stdout] 35 | | id: "RUSTCOLA049".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 50 | | } [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] 31 + impl Default for CrateWideAllowRule { [INFO] [stdout] 32 + fn default() -> Self { [INFO] [stdout] 33 + Self::new() [INFO] [stdout] 34 + } [INFO] [stdout] 35 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `MisorderedAssertEqRule` [INFO] [stdout] --> src/rules/code_quality.rs:132:5 [INFO] [stdout] | [INFO] [stdout] 132 | / pub fn new() -> Self { [INFO] [stdout] 133 | | Self { [INFO] [stdout] 134 | | metadata: RuleMetadata { [INFO] [stdout] 135 | | id: "RUSTCOLA050".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 149 | | } [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] 131 + impl Default for MisorderedAssertEqRule { [INFO] [stdout] 132 + fn default() -> Self { [INFO] [stdout] 133 + Self::new() [INFO] [stdout] 134 + } [INFO] [stdout] 135 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `TryIoResultRule` [INFO] [stdout] --> src/rules/code_quality.rs:223:5 [INFO] [stdout] | [INFO] [stdout] 223 | / pub fn new() -> Self { [INFO] [stdout] 224 | | Self { [INFO] [stdout] 225 | | metadata: RuleMetadata { [INFO] [stdout] 226 | | id: "RUSTCOLA051".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 239 | | } [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] 222 + impl Default for TryIoResultRule { [INFO] [stdout] 223 + fn default() -> Self { [INFO] [stdout] 224 + Self::new() [INFO] [stdout] 225 + } [INFO] [stdout] 226 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `LocalRefCellRule` [INFO] [stdout] --> src/rules/code_quality.rs:317:5 [INFO] [stdout] | [INFO] [stdout] 317 | / pub fn new() -> Self { [INFO] [stdout] 318 | | Self { [INFO] [stdout] 319 | | metadata: RuleMetadata { [INFO] [stdout] 320 | | id: "RUSTCOLA052".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 335 | | } [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] 316 + impl Default for LocalRefCellRule { [INFO] [stdout] 317 + fn default() -> Self { [INFO] [stdout] 318 + Self::new() [INFO] [stdout] 319 + } [INFO] [stdout] 320 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UnnecessaryBorrowMutRule` [INFO] [stdout] --> src/rules/code_quality.rs:415:5 [INFO] [stdout] | [INFO] [stdout] 415 | / pub fn new() -> Self { [INFO] [stdout] 416 | | Self { [INFO] [stdout] 417 | | metadata: RuleMetadata { [INFO] [stdout] 418 | | id: "RUSTCOLA057".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 433 | | } [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] 414 + impl Default for UnnecessaryBorrowMutRule { [INFO] [stdout] 415 + fn default() -> Self { [INFO] [stdout] 416 + Self::new() [INFO] [stdout] 417 + } [INFO] [stdout] 418 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `DeadStoreArrayRule` [INFO] [stdout] --> src/rules/code_quality.rs:529:5 [INFO] [stdout] | [INFO] [stdout] 529 | / pub fn new() -> Self { [INFO] [stdout] 530 | | Self { [INFO] [stdout] 531 | | metadata: RuleMetadata { [INFO] [stdout] 532 | | id: "RUSTCOLA068".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 547 | | } [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] 528 + impl Default for DeadStoreArrayRule { [INFO] [stdout] 529 + fn default() -> Self { [INFO] [stdout] 530 + Self::new() [INFO] [stdout] 531 + } [INFO] [stdout] 532 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `OverscopedAllowRule` [INFO] [stdout] --> src/rules/code_quality.rs:743:5 [INFO] [stdout] | [INFO] [stdout] 743 | / pub fn new() -> Self { [INFO] [stdout] 744 | | Self { [INFO] [stdout] 745 | | metadata: RuleMetadata { [INFO] [stdout] 746 | | id: "RUSTCOLA072".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 758 | | } [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] 742 + impl Default for OverscopedAllowRule { [INFO] [stdout] 743 + fn default() -> Self { [INFO] [stdout] 744 + Self::new() [INFO] [stdout] 745 + } [INFO] [stdout] 746 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `CommentedOutCodeRule` [INFO] [stdout] --> src/rules/code_quality.rs:881:5 [INFO] [stdout] | [INFO] [stdout] 881 | / pub fn new() -> Self { [INFO] [stdout] 882 | | Self { [INFO] [stdout] 883 | | metadata: RuleMetadata { [INFO] [stdout] 884 | | id: "RUSTCOLA092".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 896 | | } [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] 880 + impl Default for CommentedOutCodeRule { [INFO] [stdout] 881 + fn default() -> Self { [INFO] [stdout] 882 + Self::new() [INFO] [stdout] 883 + } [INFO] [stdout] 884 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/code_quality.rs:974:9 [INFO] [stdout] | [INFO] [stdout] 974 | / if content.contains(" = ") && !content.ends_with(':') { [INFO] [stdout] 975 | | if !lowercase.contains("means") [INFO] [stdout] 976 | | && !lowercase.contains("where") [INFO] [stdout] 977 | | && !lowercase.contains("when") [INFO] [stdout] ... | [INFO] [stdout] 982 | | } [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] 974 ~ if content.contains(" = ") && !content.ends_with(':') [INFO] [stdout] 975 ~ && !lowercase.contains("means") [INFO] [stdout] 976 | && !lowercase.contains("where") [INFO] [stdout] ... [INFO] [stdout] 980 | return true; [INFO] [stdout] 981 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/code_quality.rs:988:9 [INFO] [stdout] | [INFO] [stdout] 988 | / if has_semicolon || (has_braces && has_brackets) { [INFO] [stdout] 989 | | if !lowercase.starts_with("this ") [INFO] [stdout] 990 | | && !lowercase.starts_with("the ") [INFO] [stdout] 991 | | && !lowercase.starts_with("a ") [INFO] [stdout] ... | [INFO] [stdout] 996 | | } [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] 988 ~ if (has_semicolon || (has_braces && has_brackets)) { [INFO] [stdout] 989 ~ && !lowercase.starts_with("this ") [INFO] [stdout] 990 | && !lowercase.starts_with("the ") [INFO] [stdout] ... [INFO] [stdout] 994 | return true; [INFO] [stdout] 995 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UnwrapInHotPathRule` [INFO] [stdout] --> src/rules/code_quality.rs:1113:5 [INFO] [stdout] | [INFO] [stdout] 1113 | / pub fn new() -> Self { [INFO] [stdout] 1114 | | Self { [INFO] [stdout] 1115 | | metadata: RuleMetadata { [INFO] [stdout] 1116 | | id: "RUSTCOLA123".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1132 | | } [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] 1112 + impl Default for UnwrapInHotPathRule { [INFO] [stdout] 1113 + fn default() -> Self { [INFO] [stdout] 1114 + Self::new() [INFO] [stdout] 1115 + } [INFO] [stdout] 1116 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/code_quality.rs:1195:27 [INFO] [stdout] | [INFO] [stdout] 1195 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `NonThreadSafeTestRule` [INFO] [stdout] --> src/rules/concurrency.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | / pub fn new() -> Self { [INFO] [stdout] 37 | | Self { [INFO] [stdout] 38 | | metadata: RuleMetadata { [INFO] [stdout] 39 | | id: "RUSTCOLA074".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 56 | | } [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] 35 + impl Default for NonThreadSafeTestRule { [INFO] [stdout] 36 + fn default() -> Self { [INFO] [stdout] 37 + Self::new() [INFO] [stdout] 38 + } [INFO] [stdout] 39 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `BlockingSleepInAsyncRule` [INFO] [stdout] --> src/rules/concurrency.rs:189:5 [INFO] [stdout] | [INFO] [stdout] 189 | / pub fn new() -> Self { [INFO] [stdout] 190 | | Self { [INFO] [stdout] 191 | | metadata: RuleMetadata { [INFO] [stdout] 192 | | id: "RUSTCOLA037".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 206 | | } [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] 188 + impl Default for BlockingSleepInAsyncRule { [INFO] [stdout] 189 + fn default() -> Self { [INFO] [stdout] 190 + Self::new() [INFO] [stdout] 191 + } [INFO] [stdout] 192 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:236:27 [INFO] [stdout] | [INFO] [stdout] 236 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `BlockingOpsInAsyncRule` [INFO] [stdout] --> src/rules/concurrency.rs:331:5 [INFO] [stdout] | [INFO] [stdout] 331 | / pub fn new() -> Self { [INFO] [stdout] 332 | | Self { [INFO] [stdout] 333 | | metadata: RuleMetadata { [INFO] [stdout] 334 | | id: "RUSTCOLA093".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 349 | | } [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] 330 + impl Default for BlockingOpsInAsyncRule { [INFO] [stdout] 331 + fn default() -> Self { [INFO] [stdout] 332 + Self::new() [INFO] [stdout] 333 + } [INFO] [stdout] 334 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:493:27 [INFO] [stdout] | [INFO] [stdout] 493 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/concurrency.rs:532:17 [INFO] [stdout] | [INFO] [stdout] 532 | / if trimmed.contains("async fn ") || trimmed.contains("async move") { [INFO] [stdout] 533 | | if trimmed.contains("async fn ") { [INFO] [stdout] 534 | | in_async_fn = true; [INFO] [stdout] 535 | | async_fn_start = idx; [INFO] [stdout] ... | [INFO] [stdout] 545 | | } [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] 532 ~ if (trimmed.contains("async fn ") || trimmed.contains("async move")) { [INFO] [stdout] 533 ~ && trimmed.contains("async fn ") { [INFO] [stdout] 534 | in_async_fn = true; [INFO] [stdout] ... [INFO] [stdout] 543 | } [INFO] [stdout] 544 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `iter().copied().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable [INFO] [stdout] --> src/rules/concurrency.rs:581:81 [INFO] [stdout] | [INFO] [stdout] 581 | ... let fn_content: String = lines[async_fn_start..=idx] [INFO] [stdout] | ___________________________________________________________________________^ [INFO] [stdout] 582 | | ... .iter() [INFO] [stdout] 583 | | ... .copied() [INFO] [stdout] 584 | | ... .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 `MutexGuardAcrossAwaitRule` [INFO] [stdout] --> src/rules/concurrency.rs:655:5 [INFO] [stdout] | [INFO] [stdout] 655 | / pub fn new() -> Self { [INFO] [stdout] 656 | | Self { [INFO] [stdout] 657 | | metadata: RuleMetadata { [INFO] [stdout] 658 | | id: "RUSTCOLA094".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 672 | | } [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] 654 + impl Default for MutexGuardAcrossAwaitRule { [INFO] [stdout] 655 + fn default() -> Self { [INFO] [stdout] 656 + Self::new() [INFO] [stdout] 657 + } [INFO] [stdout] 658 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:722:27 [INFO] [stdout] | [INFO] [stdout] 722 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/concurrency.rs:759:17 [INFO] [stdout] | [INFO] [stdout] 759 | / if trimmed.contains("async fn ") || trimmed.contains("async move") { [INFO] [stdout] 760 | | if trimmed.contains("async fn ") { [INFO] [stdout] 761 | | in_async_fn = true; [INFO] [stdout] 762 | | async_fn_start = idx; [INFO] [stdout] ... | [INFO] [stdout] 772 | | } [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] 759 ~ if (trimmed.contains("async fn ") || trimmed.contains("async move")) { [INFO] [stdout] 760 ~ && trimmed.contains("async fn ") { [INFO] [stdout] 761 | in_async_fn = true; [INFO] [stdout] ... [INFO] [stdout] 770 | } [INFO] [stdout] 771 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `iter().copied().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable [INFO] [stdout] --> src/rules/concurrency.rs:791:92 [INFO] [stdout] | [INFO] [stdout] 791 | ... [async_fn_start..=std::cmp::min(idx + 50, lines.len() - 1)] [INFO] [stdout] | __________________________________________________________________________________^ [INFO] [stdout] 792 | | ... .iter() [INFO] [stdout] 793 | | ... .copied() [INFO] [stdout] 794 | | ... .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] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UnderscoreLockGuardRule` [INFO] [stdout] --> src/rules/concurrency.rs:876:5 [INFO] [stdout] | [INFO] [stdout] 876 | / pub fn new() -> Self { [INFO] [stdout] 877 | | Self { [INFO] [stdout] 878 | | metadata: RuleMetadata { [INFO] [stdout] 879 | | id: "RUSTCOLA030".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 891 | | } [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] 875 + impl Default for UnderscoreLockGuardRule { [INFO] [stdout] 876 + fn default() -> Self { [INFO] [stdout] 877 + Self::new() [INFO] [stdout] 878 + } [INFO] [stdout] 879 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/rules/concurrency.rs:938:32 [INFO] [stdout] | [INFO] [stdout] 938 | ... && var_part [INFO] [stdout] | __________________________^ [INFO] [stdout] 939 | | ... .chars() [INFO] [stdout] 940 | | ... .nth(1) [INFO] [stdout] 941 | | ... .map_or(false, |c| c.is_ascii_digit()) [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] 941 - .map_or(false, |c| c.is_ascii_digit()) [INFO] [stdout] 941 + .is_some_and(|c| c.is_ascii_digit()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/rules/concurrency.rs:974:25 [INFO] [stdout] | [INFO] [stdout] 974 | || !lock_result_var [INFO] [stdout] | _________________________^ [INFO] [stdout] 975 | | .chars() [INFO] [stdout] 976 | | .nth(1) [INFO] [stdout] 977 | | .map_or(false, |c| c.is_ascii_digit()) [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] 977 - .map_or(false, |c| c.is_ascii_digit()) [INFO] [stdout] 977 + .is_some_and(|c| c.is_ascii_digit()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/rules/concurrency.rs:1034:32 [INFO] [stdout] | [INFO] [stdout] 1034 | ... && guard_var [INFO] [stdout] | __________________________^ [INFO] [stdout] 1035 | | ... .chars() [INFO] [stdout] 1036 | | ... .nth(1) [INFO] [stdout] 1037 | | ... .map_or(false, |c| c.is_ascii_digit()) [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] 1037 - .map_or(false, |c| c.is_ascii_digit()) [INFO] [stdout] 1037 + .is_some_and(|c| c.is_ascii_digit()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `BroadcastUnsyncPayloadRule` [INFO] [stdout] --> src/rules/concurrency.rs:1088:5 [INFO] [stdout] | [INFO] [stdout] 1088 | / pub fn new() -> Self { [INFO] [stdout] 1089 | | Self { [INFO] [stdout] 1090 | | metadata: RuleMetadata { [INFO] [stdout] 1091 | | id: "RUSTCOLA023".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1103 | | } [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] 1087 + impl Default for BroadcastUnsyncPayloadRule { [INFO] [stdout] 1088 + fn default() -> Self { [INFO] [stdout] 1089 + Self::new() [INFO] [stdout] 1090 + } [INFO] [stdout] 1091 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PanicInDropRule` [INFO] [stdout] --> src/rules/concurrency.rs:1159:5 [INFO] [stdout] | [INFO] [stdout] 1159 | / pub fn new() -> Self { [INFO] [stdout] 1160 | | Self { [INFO] [stdout] 1161 | | metadata: RuleMetadata { [INFO] [stdout] 1162 | | id: "RUSTCOLA040".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1174 | | } [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] 1158 + impl Default for PanicInDropRule { [INFO] [stdout] 1159 + fn default() -> Self { [INFO] [stdout] 1160 + Self::new() [INFO] [stdout] 1161 + } [INFO] [stdout] 1162 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:1211:27 [INFO] [stdout] | [INFO] [stdout] 1211 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `UnwrapInPollRule` [INFO] [stdout] --> src/rules/concurrency.rs:1319:5 [INFO] [stdout] | [INFO] [stdout] 1319 | / pub fn new() -> Self { [INFO] [stdout] 1320 | | Self { [INFO] [stdout] 1321 | | metadata: RuleMetadata { [INFO] [stdout] 1322 | | id: "RUSTCOLA041".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1334 | | } [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] 1318 + impl Default for UnwrapInPollRule { [INFO] [stdout] 1319 + fn default() -> Self { [INFO] [stdout] 1320 + Self::new() [INFO] [stdout] 1321 + } [INFO] [stdout] 1322 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:1371:27 [INFO] [stdout] | [INFO] [stdout] 1371 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `UnsafeSendSyncBoundsRule` [INFO] [stdout] --> src/rules/concurrency.rs:1504:5 [INFO] [stdout] | [INFO] [stdout] 1504 | / pub fn new() -> Self { [INFO] [stdout] 1505 | | Self { [INFO] [stdout] 1506 | | metadata: RuleMetadata { [INFO] [stdout] 1507 | | id: "RUSTCOLA015".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1519 | | } [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] 1503 + impl Default for UnsafeSendSyncBoundsRule { [INFO] [stdout] 1504 + fn default() -> Self { [INFO] [stdout] 1505 + Self::new() [INFO] [stdout] 1506 + } [INFO] [stdout] 1507 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/rules/concurrency.rs:1590:17 [INFO] [stdout] | [INFO] [stdout] 1590 | / let Some(name) = Self::normalize_generic_name(param) else { [INFO] [stdout] 1591 | | return None; [INFO] [stdout] 1592 | | }; [INFO] [stdout] | |__________________^ help: replace it with: `let name = Self::normalize_generic_name(param)?;` [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: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:1599:26 [INFO] [stdout] | [INFO] [stdout] 1599 | .map(|rest| Self::split_bounds(rest)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Self::split_bounds` [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: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:1661:22 [INFO] [stdout] | [INFO] [stdout] 1661 | .map(|rest| Self::split_bounds(rest)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Self::split_bounds` [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: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/rules/concurrency.rs:1676:39 [INFO] [stdout] | [INFO] [stdout] 1676 | .trim_end_matches(|c| matches!(c, ',' | '{' | ';')) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `[',', '{', ';']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] = note: `#[warn(clippy::manual_pattern_char_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:1781:27 [INFO] [stdout] | [INFO] [stdout] 1781 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `NonCancellationSafeSelectRule` [INFO] [stdout] --> src/rules/concurrency.rs:1911:5 [INFO] [stdout] | [INFO] [stdout] 1911 | / pub fn new() -> Self { [INFO] [stdout] 1912 | | Self { [INFO] [stdout] 1913 | | metadata: RuleMetadata { [INFO] [stdout] 1914 | | id: "RUSTCOLA115".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1933 | | } [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] 1910 + impl Default for NonCancellationSafeSelectRule { [INFO] [stdout] 1911 + fn default() -> Self { [INFO] [stdout] 1912 + Self::new() [INFO] [stdout] 1913 + } [INFO] [stdout] 1914 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:2007:27 [INFO] [stdout] | [INFO] [stdout] 2007 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `MissingSyncBoundOnCloneRule` [INFO] [stdout] --> src/rules/concurrency.rs:2112:5 [INFO] [stdout] | [INFO] [stdout] 2112 | / pub fn new() -> Self { [INFO] [stdout] 2113 | | Self { [INFO] [stdout] 2114 | | metadata: RuleMetadata { [INFO] [stdout] 2115 | | id: "RUSTCOLA111".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 2131 | | } [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] 2111 + impl Default for MissingSyncBoundOnCloneRule { [INFO] [stdout] 2112 + fn default() -> Self { [INFO] [stdout] 2113 + Self::new() [INFO] [stdout] 2114 + } [INFO] [stdout] 2115 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:2157:27 [INFO] [stdout] | [INFO] [stdout] 2157 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `PinContractViolationRule` [INFO] [stdout] --> src/rules/concurrency.rs:2287:5 [INFO] [stdout] | [INFO] [stdout] 2287 | / pub fn new() -> Self { [INFO] [stdout] 2288 | | Self { [INFO] [stdout] 2289 | | metadata: RuleMetadata { [INFO] [stdout] 2290 | | id: "RUSTCOLA112".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 2306 | | } [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] 2286 + impl Default for PinContractViolationRule { [INFO] [stdout] 2287 + fn default() -> Self { [INFO] [stdout] 2288 + Self::new() [INFO] [stdout] 2289 + } [INFO] [stdout] 2290 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:2332:27 [INFO] [stdout] | [INFO] [stdout] 2332 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `OneshotRaceAfterCloseRule` [INFO] [stdout] --> src/rules/concurrency.rs:2425:5 [INFO] [stdout] | [INFO] [stdout] 2425 | / pub fn new() -> Self { [INFO] [stdout] 2426 | | Self { [INFO] [stdout] 2427 | | metadata: RuleMetadata { [INFO] [stdout] 2428 | | id: "RUSTCOLA113".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 2446 | | } [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] 2424 + impl Default for OneshotRaceAfterCloseRule { [INFO] [stdout] 2425 + fn default() -> Self { [INFO] [stdout] 2426 + Self::new() [INFO] [stdout] 2427 + } [INFO] [stdout] 2428 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:2472:27 [INFO] [stdout] | [INFO] [stdout] 2472 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/concurrency.rs:2530:21 [INFO] [stdout] | [INFO] [stdout] 2530 | / if in_spawn_context { [INFO] [stdout] 2531 | | if trimmed.contains(".send(") || trimmed.contains(".try_recv(") { [INFO] [stdout] 2532 | | let location = format!("{}:{}", rel_path, idx + 1); [INFO] [stdout] ... | [INFO] [stdout] 2551 | | } [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] 2530 ~ if in_spawn_context [INFO] [stdout] 2531 ~ && (trimmed.contains(".send(") || trimmed.contains(".try_recv(")) { [INFO] [stdout] 2532 | let location = format!("{}:{}", rel_path, idx + 1); [INFO] [stdout] ... [INFO] [stdout] 2549 | }); [INFO] [stdout] 2550 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `AsyncSignalUnsafeInHandlerRule` [INFO] [stdout] --> src/rules/concurrency.rs:2574:5 [INFO] [stdout] | [INFO] [stdout] 2574 | / pub fn new() -> Self { [INFO] [stdout] 2575 | | Self { [INFO] [stdout] 2576 | | metadata: RuleMetadata { [INFO] [stdout] 2577 | | id: "RUSTCOLA109".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 2596 | | } [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] 2573 + impl Default for AsyncSignalUnsafeInHandlerRule { [INFO] [stdout] 2574 + fn default() -> Self { [INFO] [stdout] 2575 + Self::new() [INFO] [stdout] 2576 + } [INFO] [stdout] 2577 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:2645:27 [INFO] [stdout] | [INFO] [stdout] 2645 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `OnceCellTocTouRule` [INFO] [stdout] --> src/rules/concurrency.rs:2763:5 [INFO] [stdout] | [INFO] [stdout] 2763 | / pub fn new() -> Self { [INFO] [stdout] 2764 | | Self { [INFO] [stdout] 2765 | | metadata: RuleMetadata { [INFO] [stdout] 2766 | | id: "RUSTCOLA100".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 2784 | | } [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] 2762 + impl Default for OnceCellTocTouRule { [INFO] [stdout] 2763 + fn default() -> Self { [INFO] [stdout] 2764 + Self::new() [INFO] [stdout] 2765 + } [INFO] [stdout] 2766 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:2824:27 [INFO] [stdout] | [INFO] [stdout] 2824 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `PanicWhileHoldingLockRule` [INFO] [stdout] --> src/rules/concurrency.rs:2920:5 [INFO] [stdout] | [INFO] [stdout] 2920 | / pub fn new() -> Self { [INFO] [stdout] 2921 | | Self { [INFO] [stdout] 2922 | | metadata: RuleMetadata { [INFO] [stdout] 2923 | | id: "RUSTCOLA117".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 2941 | | } [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] 2919 + impl Default for PanicWhileHoldingLockRule { [INFO] [stdout] 2920 + fn default() -> Self { [INFO] [stdout] 2921 + Self::new() [INFO] [stdout] 2922 + } [INFO] [stdout] 2923 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:2994:27 [INFO] [stdout] | [INFO] [stdout] 2994 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `ClosureEscapingRefsRule` [INFO] [stdout] --> src/rules/concurrency.rs:3102:5 [INFO] [stdout] | [INFO] [stdout] 3102 | / pub fn new() -> Self { [INFO] [stdout] 3103 | | Self { [INFO] [stdout] 3104 | | metadata: RuleMetadata { [INFO] [stdout] 3105 | | id: "RUSTCOLA119".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 3120 | | } [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] 3101 + impl Default for ClosureEscapingRefsRule { [INFO] [stdout] 3102 + fn default() -> Self { [INFO] [stdout] 3103 + Self::new() [INFO] [stdout] 3104 + } [INFO] [stdout] 3105 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:3171:27 [INFO] [stdout] | [INFO] [stdout] 3171 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `ExecutorStarvationRule` [INFO] [stdout] --> src/rules/concurrency.rs:3296:5 [INFO] [stdout] | [INFO] [stdout] 3296 | / pub fn new() -> Self { [INFO] [stdout] 3297 | | Self { [INFO] [stdout] 3298 | | metadata: RuleMetadata { [INFO] [stdout] 3299 | | id: "RUSTCOLA121".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 3315 | | } [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] 3295 + impl Default for ExecutorStarvationRule { [INFO] [stdout] 3296 + fn default() -> Self { [INFO] [stdout] 3297 + Self::new() [INFO] [stdout] 3298 + } [INFO] [stdout] 3299 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:3358:27 [INFO] [stdout] | [INFO] [stdout] 3358 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/rules/concurrency.rs:3413:36 [INFO] [stdout] | [INFO] [stdout] 3413 | ... .split(|c| c == '(' || c == '<') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['(', '<']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `AsyncDropCorrectnessRule` [INFO] [stdout] --> src/rules/concurrency.rs:3489:5 [INFO] [stdout] | [INFO] [stdout] 3489 | / pub fn new() -> Self { [INFO] [stdout] 3490 | | Self { [INFO] [stdout] 3491 | | metadata: RuleMetadata { [INFO] [stdout] 3492 | | id: "RUSTCOLA122".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 3508 | | } [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] 3488 + impl Default for AsyncDropCorrectnessRule { [INFO] [stdout] 3489 + fn default() -> Self { [INFO] [stdout] 3490 + Self::new() [INFO] [stdout] 3491 + } [INFO] [stdout] 3492 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:3572:27 [INFO] [stdout] | [INFO] [stdout] 3572 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/rules/concurrency.rs:3618:36 [INFO] [stdout] | [INFO] [stdout] 3618 | ... .split(|c| c == '(' || c == '<') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['(', '<']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PanicInDropImplRule` [INFO] [stdout] --> src/rules/concurrency.rs:3705:5 [INFO] [stdout] | [INFO] [stdout] 3705 | / pub fn new() -> Self { [INFO] [stdout] 3706 | | Self { [INFO] [stdout] 3707 | | metadata: RuleMetadata { [INFO] [stdout] 3708 | | id: "RUSTCOLA124".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 3724 | | } [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] 3704 + impl Default for PanicInDropImplRule { [INFO] [stdout] 3705 + fn default() -> Self { [INFO] [stdout] 3706 + Self::new() [INFO] [stdout] 3707 + } [INFO] [stdout] 3708 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:3778:27 [INFO] [stdout] | [INFO] [stdout] 3778 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `SpawnedTaskPanicRule` [INFO] [stdout] --> src/rules/concurrency.rs:3912:5 [INFO] [stdout] | [INFO] [stdout] 3912 | / pub fn new() -> Self { [INFO] [stdout] 3913 | | Self { [INFO] [stdout] 3914 | | metadata: RuleMetadata { [INFO] [stdout] 3915 | | id: "RUSTCOLA125".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 3931 | | } [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] 3911 + impl Default for SpawnedTaskPanicRule { [INFO] [stdout] 3912 + fn default() -> Self { [INFO] [stdout] 3913 + Self::new() [INFO] [stdout] 3914 + } [INFO] [stdout] 3915 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:3988:27 [INFO] [stdout] | [INFO] [stdout] 3988 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you are using an explicit closure for copying elements [INFO] [stdout] --> src/rules/concurrency.rs:4032:51 [INFO] [stdout] | [INFO] [stdout] 4032 | ... let context: String = lines[check_range] [INFO] [stdout] | _____________________________________________^ [INFO] [stdout] 4033 | | ... .iter() [INFO] [stdout] 4034 | | ... .map(|s| *s) [INFO] [stdout] | |______________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 4032 ~ let context: String = lines[check_range] [INFO] [stdout] 4033 + .iter().copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/rules/concurrency.rs:4050:142 [INFO] [stdout] | [INFO] [stdout] 4050 | ... findings.push(Finding::new(self.metadata.id.clone(), self.metadata.name.clone(), self.metadata.default_severity, format!( [INFO] [stdout] | ________________________________________________________________________________________________________________________^ [INFO] [stdout] 4051 | | ... "Spawned task without panic handling. Panics will be silently swallowed. \ [INFO] [stdout] 4052 | | ... Consider using .await on the JoinHandle or adding a panic hook." [INFO] [stdout] 4053 | | ... ), location, String::new(), vec![trimmed.to_string()], None)); [INFO] [stdout] | |___________^ [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] help: consider using `.to_string()` [INFO] [stdout] | [INFO] [stdout] 4050 ~ findings.push(Finding::new(self.metadata.id.clone(), self.metadata.name.clone(), self.metadata.default_severity, "Spawned task without panic handling. Panics will be silently swallowed. \ [INFO] [stdout] 4051 ~ Consider using .await on the JoinHandle or adding a panic hook.".to_string(), location, String::new(), vec![trimmed.to_string()], None)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/crypto.rs:69:5 [INFO] [stdout] | [INFO] [stdout] 69 | / if lower.contains("ripemd") { [INFO] [stdout] 70 | | if lower.contains("ripemd::") [INFO] [stdout] 71 | | || lower.contains("::ripemd") [INFO] [stdout] 72 | | || lower.contains("ripemd128") [INFO] [stdout] ... | [INFO] [stdout] 79 | | } [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 lower.contains("ripemd") [INFO] [stdout] 70 ~ && (lower.contains("ripemd::") [INFO] [stdout] 71 | || lower.contains("::ripemd") [INFO] [stdout] ... [INFO] [stdout] 74 | || lower.contains("ripemd256") [INFO] [stdout] 75 ~ || lower.contains("ripemd320")) [INFO] [stdout] 76 | { [INFO] [stdout] 77 | return true; [INFO] [stdout] 78 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/crypto.rs:82:5 [INFO] [stdout] | [INFO] [stdout] 82 | / if lower.contains("crc") { [INFO] [stdout] 83 | | if lower.contains("crc::") [INFO] [stdout] 84 | | || lower.contains("::crc") [INFO] [stdout] 85 | | || lower.contains("crc32") [INFO] [stdout] ... | [INFO] [stdout] 94 | | } [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] 82 ~ if lower.contains("crc") [INFO] [stdout] 83 ~ && (lower.contains("crc::") [INFO] [stdout] 84 | || lower.contains("::crc") [INFO] [stdout] ... [INFO] [stdout] 89 | || lower.contains("crc64") [INFO] [stdout] 90 ~ || lower.contains("crc_64")) [INFO] [stdout] 91 | { [INFO] [stdout] 92 | return true; [INFO] [stdout] 93 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `InsecureMd5Rule` [INFO] [stdout] --> src/rules/crypto.rs:120:5 [INFO] [stdout] | [INFO] [stdout] 120 | / pub fn new() -> Self { [INFO] [stdout] 121 | | Self { [INFO] [stdout] 122 | | metadata: RuleMetadata { [INFO] [stdout] 123 | | id: "RUSTCOLA004".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 135 | | } [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] 119 + impl Default for InsecureMd5Rule { [INFO] [stdout] 120 + fn default() -> Self { [INFO] [stdout] 121 + Self::new() [INFO] [stdout] 122 + } [INFO] [stdout] 123 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `InsecureSha1Rule` [INFO] [stdout] --> src/rules/crypto.rs:193:5 [INFO] [stdout] | [INFO] [stdout] 193 | / pub fn new() -> Self { [INFO] [stdout] 194 | | Self { [INFO] [stdout] 195 | | metadata: RuleMetadata { [INFO] [stdout] 196 | | id: "RUSTCOLA005".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 208 | | } [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] 192 + impl Default for InsecureSha1Rule { [INFO] [stdout] 193 + fn default() -> Self { [INFO] [stdout] 194 + Self::new() [INFO] [stdout] 195 + } [INFO] [stdout] 196 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `WeakHashingExtendedRule` [INFO] [stdout] --> src/rules/crypto.rs:270:5 [INFO] [stdout] | [INFO] [stdout] 270 | / pub fn new() -> Self { [INFO] [stdout] 271 | | Self { [INFO] [stdout] 272 | | metadata: RuleMetadata { [INFO] [stdout] 273 | | id: "RUSTCOLA062".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 285 | | } [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] 269 + impl Default for WeakHashingExtendedRule { [INFO] [stdout] 270 + fn default() -> Self { [INFO] [stdout] 271 + Self::new() [INFO] [stdout] 272 + } [INFO] [stdout] 273 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `HardcodedCryptoKeyRule` [INFO] [stdout] --> src/rules/crypto.rs:357:5 [INFO] [stdout] | [INFO] [stdout] 357 | / pub fn new() -> Self { [INFO] [stdout] 358 | | Self { [INFO] [stdout] 359 | | metadata: RuleMetadata { [INFO] [stdout] 360 | | id: "RUSTCOLA039".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 372 | | } [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] 356 + impl Default for HardcodedCryptoKeyRule { [INFO] [stdout] 357 + fn default() -> Self { [INFO] [stdout] 358 + Self::new() [INFO] [stdout] 359 + } [INFO] [stdout] 360 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/crypto.rs:507:27 [INFO] [stdout] | [INFO] [stdout] 507 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/crypto.rs:544:21 [INFO] [stdout] | [INFO] [stdout] 544 | / if trimmed.contains(pattern) { [INFO] [stdout] 545 | | if trimmed.contains("b\"") [INFO] [stdout] 546 | | || trimmed.contains("&[") [INFO] [stdout] 547 | | || trimmed.contains("[0x") [INFO] [stdout] ... | [INFO] [stdout] 562 | | } [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] 544 ~ if trimmed.contains(pattern) [INFO] [stdout] 545 ~ && (trimmed.contains("b\"") [INFO] [stdout] 546 | || trimmed.contains("&[") [INFO] [stdout] 547 ~ || trimmed.contains("[0x")) [INFO] [stdout] 548 | { [INFO] [stdout] ... [INFO] [stdout] 560 | )); [INFO] [stdout] 561 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `TimingAttackRule` [INFO] [stdout] --> src/rules/crypto.rs:600:5 [INFO] [stdout] | [INFO] [stdout] 600 | / pub fn new() -> Self { [INFO] [stdout] 601 | | Self { [INFO] [stdout] 602 | | metadata: RuleMetadata { [INFO] [stdout] 603 | | id: "RUSTCOLA044".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 615 | | } [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] 599 + impl Default for TimingAttackRule { [INFO] [stdout] 600 + fn default() -> Self { [INFO] [stdout] 601 + Self::new() [INFO] [stdout] 602 + } [INFO] [stdout] 603 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/crypto.rs:688:27 [INFO] [stdout] | [INFO] [stdout] 688 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `WeakCipherRule` [INFO] [stdout] --> src/rules/crypto.rs:750:5 [INFO] [stdout] | [INFO] [stdout] 750 | / pub fn new() -> Self { [INFO] [stdout] 751 | | Self { [INFO] [stdout] 752 | | metadata: RuleMetadata { [INFO] [stdout] 753 | | id: "RUSTCOLA045".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 765 | | } [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] 749 + impl Default for WeakCipherRule { [INFO] [stdout] 750 + fn default() -> Self { [INFO] [stdout] 751 + Self::new() [INFO] [stdout] 752 + } [INFO] [stdout] 753 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PredictableRandomnessRule` [INFO] [stdout] --> src/rules/crypto.rs:881:5 [INFO] [stdout] | [INFO] [stdout] 881 | / pub fn new() -> Self { [INFO] [stdout] 882 | | Self { [INFO] [stdout] 883 | | metadata: RuleMetadata { [INFO] [stdout] 884 | | id: "RUSTCOLA046".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 896 | | } [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] 880 + impl Default for PredictableRandomnessRule { [INFO] [stdout] 881 + fn default() -> Self { [INFO] [stdout] 882 + Self::new() [INFO] [stdout] 883 + } [INFO] [stdout] 884 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/crypto.rs:908:9 [INFO] [stdout] | [INFO] [stdout] 908 | / if lowered.contains("seed_from_u64") { [INFO] [stdout] 909 | | if lowered.contains("const") && (lowered.contains("_u64") || lowered.contains("_i64")) { [INFO] [stdout] 910 | | return true; [INFO] [stdout] 911 | | } [INFO] [stdout] 912 | | } [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] 908 ~ if lowered.contains("seed_from_u64") [INFO] [stdout] 909 ~ && lowered.contains("const") && (lowered.contains("_u64") || lowered.contains("_i64")) { [INFO] [stdout] 910 | return true; [INFO] [stdout] 911 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/crypto.rs:914:9 [INFO] [stdout] | [INFO] [stdout] 914 | / if lowered.contains("from_seed") { [INFO] [stdout] 915 | | if lowered.contains("const") && lowered.contains("[") { [INFO] [stdout] 916 | | return true; [INFO] [stdout] 917 | | } [INFO] [stdout] 918 | | } [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] 914 ~ if lowered.contains("from_seed") [INFO] [stdout] 915 ~ && lowered.contains("const") && lowered.contains("[") { [INFO] [stdout] 916 | return true; [INFO] [stdout] 917 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ModuloBiasRandomRule` [INFO] [stdout] --> src/rules/crypto.rs:996:5 [INFO] [stdout] | [INFO] [stdout] 996 | / pub fn new() -> Self { [INFO] [stdout] 997 | | Self { [INFO] [stdout] 998 | | metadata: RuleMetadata { [INFO] [stdout] 999 | | id: "RUSTCOLA011".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1011 | | } [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] 995 + impl Default for ModuloBiasRandomRule { [INFO] [stdout] 996 + fn default() -> Self { [INFO] [stdout] 997 + Self::new() [INFO] [stdout] 998 + } [INFO] [stdout] 999 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `AllocatorMismatchFfiRule` [INFO] [stdout] --> src/rules/ffi.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | / pub fn new() -> Self { [INFO] [stdout] 32 | | Self { [INFO] [stdout] 33 | | metadata: RuleMetadata { [INFO] [stdout] 34 | | id: "RUSTCOLA017".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 52 | | } [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] 30 + impl Default for AllocatorMismatchFfiRule { [INFO] [stdout] 31 + fn default() -> Self { [INFO] [stdout] 32 + Self::new() [INFO] [stdout] 33 + } [INFO] [stdout] 34 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UnsafeFfiPointerReturnRule` [INFO] [stdout] --> src/rules/ffi.rs:257:5 [INFO] [stdout] | [INFO] [stdout] 257 | / pub fn new() -> Self { [INFO] [stdout] 258 | | Self { [INFO] [stdout] 259 | | metadata: RuleMetadata { [INFO] [stdout] 260 | | id: "RUSTCOLA073".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 276 | | } [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] 256 + impl Default for UnsafeFfiPointerReturnRule { [INFO] [stdout] 257 + fn default() -> Self { [INFO] [stdout] 258 + Self::new() [INFO] [stdout] 259 + } [INFO] [stdout] 260 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PackedFieldReferenceRule` [INFO] [stdout] --> src/rules/ffi.rs:364:5 [INFO] [stdout] | [INFO] [stdout] 364 | / pub fn new() -> Self { [INFO] [stdout] 365 | | Self { [INFO] [stdout] 366 | | metadata: RuleMetadata { [INFO] [stdout] 367 | | id: "RUSTCOLA035".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 381 | | } [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] 363 + impl Default for PackedFieldReferenceRule { [INFO] [stdout] 364 + fn default() -> Self { [INFO] [stdout] 365 + Self::new() [INFO] [stdout] 366 + } [INFO] [stdout] 367 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/ffi.rs:410:27 [INFO] [stdout] | [INFO] [stdout] 410 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: the loop variable `j` is only used to index `lines` [INFO] [stdout] --> src/rules/ffi.rs:437:30 [INFO] [stdout] | [INFO] [stdout] 437 | for j in (idx + 1).min(lines.len())..lines.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 437 - for j in (idx + 1).min(lines.len())..lines.len() { [INFO] [stdout] 437 + for in lines.iter().skip((idx + 1).min(lines.len())) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/rules/ffi.rs:443:33 [INFO] [stdout] | [INFO] [stdout] 443 | ... &struct_line[11..] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/rules/ffi.rs:442:48 [INFO] [stdout] | [INFO] [stdout] 442 | ... let after_struct = if struct_line.starts_with("pub struct ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 442 ~ let after_struct = if let Some() = struct_line.strip_prefix("pub struct ") { [INFO] [stdout] 443 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/ffi.rs:464:27 [INFO] [stdout] | [INFO] [stdout] 464 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `UnsafeCStringPointerRule` [INFO] [stdout] --> src/rules/ffi.rs:540:5 [INFO] [stdout] | [INFO] [stdout] 540 | / pub fn new() -> Self { [INFO] [stdout] 541 | | Self { [INFO] [stdout] 542 | | metadata: RuleMetadata { [INFO] [stdout] 543 | | id: "RUSTCOLA036".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 558 | | } [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] 539 + impl Default for UnsafeCStringPointerRule { [INFO] [stdout] 540 + fn default() -> Self { [INFO] [stdout] 541 + Self::new() [INFO] [stdout] 542 + } [INFO] [stdout] 543 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/ffi.rs:600:27 [INFO] [stdout] | [INFO] [stdout] 600 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `CtorDtorStdApiRule` [INFO] [stdout] --> src/rules/ffi.rs:663:5 [INFO] [stdout] | [INFO] [stdout] 663 | / pub fn new() -> Self { [INFO] [stdout] 664 | | Self { [INFO] [stdout] 665 | | metadata: RuleMetadata { [INFO] [stdout] 666 | | id: "RUSTCOLA059".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 678 | | } [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] 662 + impl Default for CtorDtorStdApiRule { [INFO] [stdout] 663 + fn default() -> Self { [INFO] [stdout] 664 + Self::new() [INFO] [stdout] 665 + } [INFO] [stdout] 666 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `FfiBufferLeakRule` [INFO] [stdout] --> src/rules/ffi.rs:764:5 [INFO] [stdout] | [INFO] [stdout] 764 | / pub fn new() -> Self { [INFO] [stdout] 765 | | Self { [INFO] [stdout] 766 | | metadata: RuleMetadata { [INFO] [stdout] 767 | | id: "RUSTCOLA016".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 779 | | } [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] 763 + impl Default for FfiBufferLeakRule { [INFO] [stdout] 764 + fn default() -> Self { [INFO] [stdout] 765 + Self::new() [INFO] [stdout] 766 + } [INFO] [stdout] 767 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `pending_no_mangle` after checking its variant with `is_some` [INFO] [stdout] --> src/rules/ffi.rs:903:33 [INFO] [stdout] | [INFO] [stdout] 901 | } else if pending_no_mangle.is_some() && trimmed.contains("fn ") { [INFO] [stdout] | --------------------------- the check is happening here [INFO] [stdout] 902 | is_ffi_fn = true; [INFO] [stdout] 903 | start_idx = pending_no_mangle.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `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: redundant closure [INFO] [stdout] --> src/rules/ffi.rs:840:27 [INFO] [stdout] | [INFO] [stdout] 840 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: the loop variable `attr_idx` is only used to index `lines` [INFO] [stdout] --> src/rules/ffi.rs:919:37 [INFO] [stdout] | [INFO] [stdout] 919 | for attr_idx in start_idx..idx { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 919 - for attr_idx in start_idx..idx { [INFO] [stdout] 919 + for in lines.iter().take(idx).skip(start_idx) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/rules/ffi.rs:949:75 [INFO] [stdout] | [INFO] [stdout] 949 | let body_done = if body_started && brace_balance <= 0 { [INFO] [stdout] | ___________________________________________________________________________^ [INFO] [stdout] 950 | | true [INFO] [stdout] 951 | | } else if !body_started && trimmed_sanitized.ends_with(';') { [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/rules/ffi.rs:951:81 [INFO] [stdout] | [INFO] [stdout] 951 | } else if !body_started && trimmed_sanitized.ends_with(';') { [INFO] [stdout] | _________________________________________________________________________________^ [INFO] [stdout] 952 | | true [INFO] [stdout] 953 | | } else { [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-then-else expression returns a bool literal [INFO] [stdout] --> src/rules/ffi.rs:951:28 [INFO] [stdout] | [INFO] [stdout] 951 | } else if !body_started && trimmed_sanitized.ends_with(';') { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 952 | | true [INFO] [stdout] 953 | | } else { [INFO] [stdout] 954 | | false [INFO] [stdout] 955 | | }; [INFO] [stdout] | |_____________________^ help: you can reduce it to: `{ !body_started && trimmed_sanitized.ends_with(';') }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PanicInFfiBoundaryRule` [INFO] [stdout] --> src/rules/ffi.rs:1068:5 [INFO] [stdout] | [INFO] [stdout] 1068 | / pub fn new() -> Self { [INFO] [stdout] 1069 | | Self { [INFO] [stdout] 1070 | | metadata: RuleMetadata { [INFO] [stdout] 1071 | | id: "RUSTCOLA116".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1089 | | } [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] 1067 + impl Default for PanicInFfiBoundaryRule { [INFO] [stdout] 1068 + fn default() -> Self { [INFO] [stdout] 1069 + Self::new() [INFO] [stdout] 1070 + } [INFO] [stdout] 1071 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/ffi.rs:1132:27 [INFO] [stdout] | [INFO] [stdout] 1132 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `EmbeddedInterpreterUsageRule` [INFO] [stdout] --> src/rules/ffi.rs:1283:5 [INFO] [stdout] | [INFO] [stdout] 1283 | / pub fn new() -> Self { [INFO] [stdout] 1284 | | Self { [INFO] [stdout] 1285 | | metadata: RuleMetadata { [INFO] [stdout] 1286 | | id: "RUSTCOLA107".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1303 | | } [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] 1282 + impl Default for EmbeddedInterpreterUsageRule { [INFO] [stdout] 1283 + fn default() -> Self { [INFO] [stdout] 1284 + Self::new() [INFO] [stdout] 1285 + } [INFO] [stdout] 1286 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/ffi.rs:1354:27 [INFO] [stdout] | [INFO] [stdout] 1354 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `WasmLinearMemoryOobRule` [INFO] [stdout] --> src/rules/ffi.rs:1446:5 [INFO] [stdout] | [INFO] [stdout] 1446 | / pub fn new() -> Self { [INFO] [stdout] 1447 | | Self { [INFO] [stdout] 1448 | | metadata: RuleMetadata { [INFO] [stdout] 1449 | | id: "RUSTCOLA103".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1465 | | } [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] 1445 + impl Default for WasmLinearMemoryOobRule { [INFO] [stdout] 1446 + fn default() -> Self { [INFO] [stdout] 1447 + Self::new() [INFO] [stdout] 1448 + } [INFO] [stdout] 1449 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/ffi.rs:1528:27 [INFO] [stdout] | [INFO] [stdout] 1528 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/rules/ffi.rs:1594:36 [INFO] [stdout] | [INFO] [stdout] 1594 | ... .split(|c| c == '(' || c == '<') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['(', '<']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `WasmHostFunctionTrustRule` [INFO] [stdout] --> src/rules/ffi.rs:1664:5 [INFO] [stdout] | [INFO] [stdout] 1664 | / pub fn new() -> Self { [INFO] [stdout] 1665 | | Self { [INFO] [stdout] 1666 | | metadata: RuleMetadata { [INFO] [stdout] 1667 | | id: "RUSTCOLA126".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1682 | | } [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] 1663 + impl Default for WasmHostFunctionTrustRule { [INFO] [stdout] 1664 + fn default() -> Self { [INFO] [stdout] 1665 + Self::new() [INFO] [stdout] 1666 + } [INFO] [stdout] 1667 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `WasmCapabilityLeakRule` [INFO] [stdout] --> src/rules/ffi.rs:1836:5 [INFO] [stdout] | [INFO] [stdout] 1836 | / pub fn new() -> Self { [INFO] [stdout] 1837 | | Self { [INFO] [stdout] 1838 | | metadata: RuleMetadata { [INFO] [stdout] 1839 | | id: "RUSTCOLA127".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1856 | | } [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] 1835 + impl Default for WasmCapabilityLeakRule { [INFO] [stdout] 1836 + fn default() -> Self { [INFO] [stdout] 1837 + Self::new() [INFO] [stdout] 1838 + } [INFO] [stdout] 1839 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UntrustedEnvInputRule` [INFO] [stdout] --> src/rules/injection.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | / pub fn new() -> Self { [INFO] [stdout] 33 | | Self { [INFO] [stdout] 34 | | metadata: RuleMetadata { [INFO] [stdout] 35 | | id: "RUSTCOLA006".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 47 | | } [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] 31 + impl Default for UntrustedEnvInputRule { [INFO] [stdout] 32 + fn default() -> Self { [INFO] [stdout] 33 + Self::new() [INFO] [stdout] 34 + } [INFO] [stdout] 35 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `CommandInjectionRiskRule` [INFO] [stdout] --> src/rules/injection.rs:91:5 [INFO] [stdout] | [INFO] [stdout] 91 | / pub fn new() -> Self { [INFO] [stdout] 92 | | Self { [INFO] [stdout] 93 | | metadata: RuleMetadata { [INFO] [stdout] 94 | | id: "RUSTCOLA007".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 106 | | } [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] 90 + impl Default for CommandInjectionRiskRule { [INFO] [stdout] 91 + fn default() -> Self { [INFO] [stdout] 92 + Self::new() [INFO] [stdout] 93 + } [INFO] [stdout] 94 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `CommandArgConcatenationRule` [INFO] [stdout] --> src/rules/injection.rs:191:5 [INFO] [stdout] | [INFO] [stdout] 191 | / pub fn new() -> Self { [INFO] [stdout] 192 | | Self { [INFO] [stdout] 193 | | metadata: RuleMetadata { [INFO] [stdout] 194 | | id: "RUSTCOLA031".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 206 | | } [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] 190 + impl Default for CommandArgConcatenationRule { [INFO] [stdout] 191 + fn default() -> Self { [INFO] [stdout] 192 + Self::new() [INFO] [stdout] 193 + } [INFO] [stdout] 194 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `LogInjectionRule` [INFO] [stdout] --> src/rules/injection.rs:320:5 [INFO] [stdout] | [INFO] [stdout] 320 | / pub fn new() -> Self { [INFO] [stdout] 321 | | Self { [INFO] [stdout] 322 | | metadata: RuleMetadata { [INFO] [stdout] 323 | | id: "RUSTCOLA076".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 340 | | } [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] 319 + impl Default for LogInjectionRule { [INFO] [stdout] 320 + fn default() -> Self { [INFO] [stdout] 321 + Self::new() [INFO] [stdout] 322 + } [INFO] [stdout] 323 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `RegexInjectionRule` [INFO] [stdout] --> src/rules/injection.rs:609:5 [INFO] [stdout] | [INFO] [stdout] 609 | / pub fn new() -> Self { [INFO] [stdout] 610 | | Self { [INFO] [stdout] 611 | | metadata: RuleMetadata { [INFO] [stdout] 612 | | id: "RUSTCOLA079".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 631 | | } [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] 608 + impl Default for RegexInjectionRule { [INFO] [stdout] 609 + fn default() -> Self { [INFO] [stdout] 610 + Self::new() [INFO] [stdout] 611 + } [INFO] [stdout] 612 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UncheckedIndexRule` [INFO] [stdout] --> src/rules/injection.rs:1021:5 [INFO] [stdout] | [INFO] [stdout] 1021 | / pub fn new() -> Self { [INFO] [stdout] 1022 | | Self { [INFO] [stdout] 1023 | | metadata: RuleMetadata { [INFO] [stdout] 1024 | | id: "RUSTCOLA080".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1043 | | } [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] 1020 + impl Default for UncheckedIndexRule { [INFO] [stdout] 1021 + fn default() -> Self { [INFO] [stdout] 1022 + Self::new() [INFO] [stdout] 1023 + } [INFO] [stdout] 1024 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PathTraversalRule` [INFO] [stdout] --> src/rules/injection.rs:1429:5 [INFO] [stdout] | [INFO] [stdout] 1429 | / pub fn new() -> Self { [INFO] [stdout] 1430 | | Self { [INFO] [stdout] 1431 | | metadata: RuleMetadata { [INFO] [stdout] 1432 | | id: "RUSTCOLA086".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1451 | | } [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] 1428 + impl Default for PathTraversalRule { [INFO] [stdout] 1429 + fn default() -> Self { [INFO] [stdout] 1430 + Self::new() [INFO] [stdout] 1431 + } [INFO] [stdout] 1432 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/injection.rs:1561:25 [INFO] [stdout] | [INFO] [stdout] 1561 | / if self.contains_var(trimmed, &untrusted) { [INFO] [stdout] 1562 | | if !untrusted_vars.contains(&target) { [INFO] [stdout] 1563 | | untrusted_vars.insert(target.clone()); [INFO] [stdout] 1564 | | changed = true; [INFO] [stdout] 1565 | | } [INFO] [stdout] 1566 | | } [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] 1561 ~ if self.contains_var(trimmed, &untrusted) [INFO] [stdout] 1562 ~ && !untrusted_vars.contains(&target) { [INFO] [stdout] 1563 | untrusted_vars.insert(target.clone()); [INFO] [stdout] 1564 | changed = true; [INFO] [stdout] 1565 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/rules/injection.rs:1595:25 [INFO] [stdout] | [INFO] [stdout] 1595 | after_amp[4..].trim_end_matches(';') [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/rules/injection.rs:1594:34 [INFO] [stdout] | [INFO] [stdout] 1594 | let target = if after_amp.starts_with("mut ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 1594 ~ let target = if let Some() = after_amp.strip_prefix("mut ") { [INFO] [stdout] 1595 ~ .trim_end_matches(';') [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/injection.rs:1634:9 [INFO] [stdout] | [INFO] [stdout] 1634 | / if body_str.contains("switchInt(") { [INFO] [stdout] 1635 | | if body_str.contains("contains(") [INFO] [stdout] 1636 | | || body_str.contains("starts_with(") [INFO] [stdout] 1637 | | || body_str.contains("is_relative()") [INFO] [stdout] ... | [INFO] [stdout] 1642 | | } [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] 1634 ~ if body_str.contains("switchInt(") [INFO] [stdout] 1635 ~ && (body_str.contains("contains(") [INFO] [stdout] 1636 | || body_str.contains("starts_with(") [INFO] [stdout] 1637 | || body_str.contains("is_relative()") [INFO] [stdout] 1638 ~ || body_str.contains("strip_prefix(")) [INFO] [stdout] 1639 | { [INFO] [stdout] 1640 | return true; [INFO] [stdout] 1641 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SsrfRule` [INFO] [stdout] --> src/rules/injection.rs:1872:5 [INFO] [stdout] | [INFO] [stdout] 1872 | / pub fn new() -> Self { [INFO] [stdout] 1873 | | Self { [INFO] [stdout] 1874 | | metadata: RuleMetadata { [INFO] [stdout] 1875 | | id: "RUSTCOLA088".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1896 | | } [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] 1871 + impl Default for SsrfRule { [INFO] [stdout] 1872 + fn default() -> Self { [INFO] [stdout] 1873 + Self::new() [INFO] [stdout] 1874 + } [INFO] [stdout] 1875 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/injection.rs:2035:25 [INFO] [stdout] | [INFO] [stdout] 2035 | / if self.contains_var(trimmed, &untrusted) { [INFO] [stdout] 2036 | | if !untrusted_vars.contains(&target) { [INFO] [stdout] 2037 | | untrusted_vars.insert(target.clone()); [INFO] [stdout] 2038 | | changed = true; [INFO] [stdout] 2039 | | } [INFO] [stdout] 2040 | | } [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] 2035 ~ if self.contains_var(trimmed, &untrusted) [INFO] [stdout] 2036 ~ && !untrusted_vars.contains(&target) { [INFO] [stdout] 2037 | untrusted_vars.insert(target.clone()); [INFO] [stdout] 2038 | changed = true; [INFO] [stdout] 2039 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SqlInjectionRule` [INFO] [stdout] --> src/rules/injection.rs:2259:5 [INFO] [stdout] | [INFO] [stdout] 2259 | / pub fn new() -> Self { [INFO] [stdout] 2260 | | Self { [INFO] [stdout] 2261 | | metadata: RuleMetadata { [INFO] [stdout] 2262 | | id: "RUSTCOLA087".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 2279 | | } [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] 2258 + impl Default for SqlInjectionRule { [INFO] [stdout] 2259 + fn default() -> Self { [INFO] [stdout] 2260 + Self::new() [INFO] [stdout] 2261 + } [INFO] [stdout] 2262 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/injection.rs:2542:25 [INFO] [stdout] | [INFO] [stdout] 2542 | / if self.contains_var(trimmed, &untrusted) { [INFO] [stdout] 2543 | | if !untrusted_vars.contains(&target) { [INFO] [stdout] 2544 | | untrusted_vars.insert(target.clone()); [INFO] [stdout] 2545 | | changed = true; [INFO] [stdout] 2546 | | } [INFO] [stdout] 2547 | | } [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] 2542 ~ if self.contains_var(trimmed, &untrusted) [INFO] [stdout] 2543 ~ && !untrusted_vars.contains(&target) { [INFO] [stdout] 2544 | untrusted_vars.insert(target.clone()); [INFO] [stdout] 2545 | changed = true; [INFO] [stdout] 2546 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/injection.rs:2700:25 [INFO] [stdout] | [INFO] [stdout] 2700 | / if self.contains_var(trimmed, &untrusted) { [INFO] [stdout] 2701 | | if !untrusted_vars.contains(&target) { [INFO] [stdout] 2702 | | untrusted_vars.insert(target.clone()); [INFO] [stdout] 2703 | | changed = true; [INFO] [stdout] 2704 | | } [INFO] [stdout] 2705 | | } [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] 2700 ~ if self.contains_var(trimmed, &untrusted) [INFO] [stdout] 2701 ~ && !untrusted_vars.contains(&target) { [INFO] [stdout] 2702 | untrusted_vars.insert(target.clone()); [INFO] [stdout] 2703 | changed = true; [INFO] [stdout] 2704 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `InterProceduralCommandInjectionRule` [INFO] [stdout] --> src/rules/injection.rs:2939:5 [INFO] [stdout] | [INFO] [stdout] 2939 | / pub fn new() -> Self { [INFO] [stdout] 2940 | | Self { [INFO] [stdout] 2941 | | metadata: RuleMetadata { [INFO] [stdout] 2942 | | id: "RUSTCOLA098".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 2960 | | } [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] 2938 + impl Default for InterProceduralCommandInjectionRule { [INFO] [stdout] 2939 + fn default() -> Self { [INFO] [stdout] 2940 + Self::new() [INFO] [stdout] 2941 + } [INFO] [stdout] 2942 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/injection.rs:2995:17 [INFO] [stdout] | [INFO] [stdout] 2995 | / if flow.sink_function.contains("test") && flow.sink_function.contains("::") { [INFO] [stdout] 2996 | | if !flow.sink_function.starts_with("test_") { [INFO] [stdout] 2997 | | continue; [INFO] [stdout] 2998 | | } [INFO] [stdout] 2999 | | } [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] 2995 ~ if flow.sink_function.contains("test") && flow.sink_function.contains("::") [INFO] [stdout] 2996 ~ && !flow.sink_function.starts_with("test_") { [INFO] [stdout] 2997 | continue; [INFO] [stdout] 2998 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `CleartextEnvVarRule` [INFO] [stdout] --> src/rules/input.rs:50:5 [INFO] [stdout] | [INFO] [stdout] 50 | / pub fn new() -> Self { [INFO] [stdout] 51 | | Self { [INFO] [stdout] 52 | | metadata: RuleMetadata { [INFO] [stdout] 53 | | id: "RUSTCOLA065".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 70 | | } [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] 49 + impl Default for CleartextEnvVarRule { [INFO] [stdout] 50 + fn default() -> Self { [INFO] [stdout] 51 + Self::new() [INFO] [stdout] 52 + } [INFO] [stdout] 53 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `EnvVarLiteralRule` [INFO] [stdout] --> src/rules/input.rs:169:5 [INFO] [stdout] | [INFO] [stdout] 169 | / pub fn new() -> Self { [INFO] [stdout] 170 | | Self { [INFO] [stdout] 171 | | metadata: RuleMetadata { [INFO] [stdout] 172 | | id: "RUSTCOLA047".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 188 | | } [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] 168 + impl Default for EnvVarLiteralRule { [INFO] [stdout] 169 + fn default() -> Self { [INFO] [stdout] 170 + Self::new() [INFO] [stdout] 171 + } [INFO] [stdout] 172 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `InvisibleUnicodeRule` [INFO] [stdout] --> src/rules/input.rs:261:5 [INFO] [stdout] | [INFO] [stdout] 261 | / pub fn new() -> Self { [INFO] [stdout] 262 | | Self { [INFO] [stdout] 263 | | metadata: RuleMetadata { [INFO] [stdout] 264 | | id: "RUSTCOLA048".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 280 | | } [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] 260 + impl Default for InvisibleUnicodeRule { [INFO] [stdout] 261 + fn default() -> Self { [INFO] [stdout] 262 + Self::new() [INFO] [stdout] 263 + } [INFO] [stdout] 264 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UntrimmedStdinRule` [INFO] [stdout] --> src/rules/input.rs:374:5 [INFO] [stdout] | [INFO] [stdout] 374 | / pub fn new() -> Self { [INFO] [stdout] 375 | | Self { [INFO] [stdout] 376 | | metadata: RuleMetadata { [INFO] [stdout] 377 | | id: "RUSTCOLA053".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 393 | | } [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] 373 + impl Default for UntrimmedStdinRule { [INFO] [stdout] 374 + fn default() -> Self { [INFO] [stdout] 375 + Self::new() [INFO] [stdout] 376 + } [INFO] [stdout] 377 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `InfiniteIteratorRule` [INFO] [stdout] --> src/rules/input.rs:473:5 [INFO] [stdout] | [INFO] [stdout] 473 | / pub fn new() -> Self { [INFO] [stdout] 474 | | Self { [INFO] [stdout] 475 | | metadata: RuleMetadata { [INFO] [stdout] 476 | | id: "RUSTCOLA054".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 492 | | } [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] 472 + impl Default for InfiniteIteratorRule { [INFO] [stdout] 473 + fn default() -> Self { [INFO] [stdout] 474 + Self::new() [INFO] [stdout] 475 + } [INFO] [stdout] 476 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `DivisionByUntrustedRule` [INFO] [stdout] --> src/rules/input.rs:609:5 [INFO] [stdout] | [INFO] [stdout] 609 | / pub fn new() -> Self { [INFO] [stdout] 610 | | Self { [INFO] [stdout] 611 | | metadata: RuleMetadata { [INFO] [stdout] 612 | | id: "RUSTCOLA077".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 628 | | } [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] 608 + impl Default for DivisionByUntrustedRule { [INFO] [stdout] 609 + fn default() -> Self { [INFO] [stdout] 610 + Self::new() [INFO] [stdout] 611 + } [INFO] [stdout] 612 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `InsecureYamlDeserializationRule` [INFO] [stdout] --> src/rules/input.rs:810:5 [INFO] [stdout] | [INFO] [stdout] 810 | / pub fn new() -> Self { [INFO] [stdout] 811 | | Self { [INFO] [stdout] 812 | | metadata: RuleMetadata { [INFO] [stdout] 813 | | id: "RUSTCOLA089".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 832 | | } [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] 809 + impl Default for InsecureYamlDeserializationRule { [INFO] [stdout] 810 + fn default() -> Self { [INFO] [stdout] 811 + Self::new() [INFO] [stdout] 812 + } [INFO] [stdout] 813 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UnboundedReadRule` [INFO] [stdout] --> src/rules/input.rs:1069:5 [INFO] [stdout] | [INFO] [stdout] 1069 | / pub fn new() -> Self { [INFO] [stdout] 1070 | | Self { [INFO] [stdout] 1071 | | metadata: RuleMetadata { [INFO] [stdout] 1072 | | id: "RUSTCOLA090".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1088 | | } [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] 1068 + impl Default for UnboundedReadRule { [INFO] [stdout] 1069 + fn default() -> Self { [INFO] [stdout] 1070 + Self::new() [INFO] [stdout] 1071 + } [INFO] [stdout] 1072 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `InsecureJsonTomlDeserializationRule` [INFO] [stdout] --> src/rules/input.rs:1233:5 [INFO] [stdout] | [INFO] [stdout] 1233 | / pub fn new() -> Self { [INFO] [stdout] 1234 | | Self { [INFO] [stdout] 1235 | | metadata: RuleMetadata { [INFO] [stdout] 1236 | | id: "RUSTCOLA091".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1254 | | } [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] 1232 + impl Default for InsecureJsonTomlDeserializationRule { [INFO] [stdout] 1233 + fn default() -> Self { [INFO] [stdout] 1234 + Self::new() [INFO] [stdout] 1235 + } [INFO] [stdout] 1236 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SerdeLengthMismatchRule` [INFO] [stdout] --> src/rules/input.rs:1461:5 [INFO] [stdout] | [INFO] [stdout] 1461 | / pub fn new() -> Self { [INFO] [stdout] 1462 | | Self { [INFO] [stdout] 1463 | | metadata: RuleMetadata { [INFO] [stdout] 1464 | | id: "RUSTCOLA081".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1481 | | } [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] 1460 + impl Default for SerdeLengthMismatchRule { [INFO] [stdout] 1461 + fn default() -> Self { [INFO] [stdout] 1462 + Self::new() [INFO] [stdout] 1463 + } [INFO] [stdout] 1464 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UncheckedTimestampMultiplicationRule` [INFO] [stdout] --> src/rules/input.rs:1863:5 [INFO] [stdout] | [INFO] [stdout] 1863 | / pub fn new() -> Self { [INFO] [stdout] 1864 | | Self { [INFO] [stdout] 1865 | | metadata: RuleMetadata { [INFO] [stdout] 1866 | | id: "RUSTCOLA106".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1882 | | } [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] 1862 + impl Default for UncheckedTimestampMultiplicationRule { [INFO] [stdout] 1863 + fn default() -> Self { [INFO] [stdout] 1864 + Self::new() [INFO] [stdout] 1865 + } [INFO] [stdout] 1866 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/input.rs:1923:27 [INFO] [stdout] | [INFO] [stdout] 1923 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `BoxIntoRawRule` [INFO] [stdout] --> src/rules/memory.rs:326:5 [INFO] [stdout] | [INFO] [stdout] 326 | / pub fn new() -> Self { [INFO] [stdout] 327 | | Self { [INFO] [stdout] 328 | | metadata: RuleMetadata { [INFO] [stdout] 329 | | id: "RUSTCOLA001".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 341 | | } [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] 325 + impl Default for BoxIntoRawRule { [INFO] [stdout] 326 + fn default() -> Self { [INFO] [stdout] 327 + Self::new() [INFO] [stdout] 328 + } [INFO] [stdout] 329 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `TransmuteRule` [INFO] [stdout] --> src/rules/memory.rs:410:5 [INFO] [stdout] | [INFO] [stdout] 410 | / pub fn new() -> Self { [INFO] [stdout] 411 | | Self { [INFO] [stdout] 412 | | metadata: RuleMetadata { [INFO] [stdout] 413 | | id: "RUSTCOLA002".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 425 | | } [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] 409 + impl Default for TransmuteRule { [INFO] [stdout] 410 + fn default() -> Self { [INFO] [stdout] 411 + Self::new() [INFO] [stdout] 412 + } [INFO] [stdout] 413 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UnsafeUsageRule` [INFO] [stdout] --> src/rules/memory.rs:522:5 [INFO] [stdout] | [INFO] [stdout] 522 | / pub fn new() -> Self { [INFO] [stdout] 523 | | Self { [INFO] [stdout] 524 | | metadata: RuleMetadata { [INFO] [stdout] 525 | | id: "RUSTCOLA003".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 537 | | } [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] 521 + impl Default for UnsafeUsageRule { [INFO] [stdout] 522 + fn default() -> Self { [INFO] [stdout] 523 + Self::new() [INFO] [stdout] 524 + } [INFO] [stdout] 525 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `NullPointerTransmuteRule` [INFO] [stdout] --> src/rules/memory.rs:626:5 [INFO] [stdout] | [INFO] [stdout] 626 | / pub fn new() -> Self { [INFO] [stdout] 627 | | Self { [INFO] [stdout] 628 | | metadata: RuleMetadata { [INFO] [stdout] 629 | | id: "RUSTCOLA063".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 641 | | } [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] 625 + impl Default for NullPointerTransmuteRule { [INFO] [stdout] 626 + fn default() -> Self { [INFO] [stdout] 627 + Self::new() [INFO] [stdout] 628 + } [INFO] [stdout] 629 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ZSTPointerArithmeticRule` [INFO] [stdout] --> src/rules/memory.rs:713:5 [INFO] [stdout] | [INFO] [stdout] 713 | / pub fn new() -> Self { [INFO] [stdout] 714 | | Self { [INFO] [stdout] 715 | | metadata: RuleMetadata { [INFO] [stdout] 716 | | id: "RUSTCOLA064".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 728 | | } [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] 712 + impl Default for ZSTPointerArithmeticRule { [INFO] [stdout] 713 + fn default() -> Self { [INFO] [stdout] 714 + Self::new() [INFO] [stdout] 715 + } [INFO] [stdout] 716 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `VecSetLenRule` [INFO] [stdout] --> src/rules/memory.rs:802:5 [INFO] [stdout] | [INFO] [stdout] 802 | / pub fn new() -> Self { [INFO] [stdout] 803 | | Self { [INFO] [stdout] 804 | | metadata: RuleMetadata { [INFO] [stdout] 805 | | id: "RUSTCOLA008".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 820 | | } [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] 801 + impl Default for VecSetLenRule { [INFO] [stdout] 802 + fn default() -> Self { [INFO] [stdout] 803 + Self::new() [INFO] [stdout] 804 + } [INFO] [stdout] 805 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `MaybeUninitAssumeInitRule` [INFO] [stdout] --> src/rules/memory.rs:913:5 [INFO] [stdout] | [INFO] [stdout] 913 | / pub fn new() -> Self { [INFO] [stdout] 914 | | Self { [INFO] [stdout] 915 | | metadata: RuleMetadata { [INFO] [stdout] 916 | | id: "RUSTCOLA009".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 934 | | } [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] 912 + impl Default for MaybeUninitAssumeInitRule { [INFO] [stdout] 913 + fn default() -> Self { [INFO] [stdout] 914 + Self::new() [INFO] [stdout] 915 + } [INFO] [stdout] 916 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded use of `concat!` macro [INFO] [stdout] --> src/rules/memory.rs:991:33 [INFO] [stdout] | [INFO] [stdout] 991 | const MEM_MODULE_SYMBOL: &str = concat!("mem"); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace with: `"mem"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_concat [INFO] [stdout] = note: `#[warn(clippy::useless_concat)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded use of `concat!` macro [INFO] [stdout] --> src/rules/memory.rs:992:40 [INFO] [stdout] | [INFO] [stdout] 992 | const MEM_UNINITIALIZED_SYMBOL: &str = concat!("uninitialized"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `"uninitialized"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_concat [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded use of `concat!` macro [INFO] [stdout] --> src/rules/memory.rs:993:33 [INFO] [stdout] | [INFO] [stdout] 993 | const MEM_ZEROED_SYMBOL: &str = concat!("zeroed"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace with: `"zeroed"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_concat [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `MemUninitZeroedRule` [INFO] [stdout] --> src/rules/memory.rs:1000:5 [INFO] [stdout] | [INFO] [stdout] 1000 | / pub fn new() -> Self { [INFO] [stdout] 1001 | | Self { [INFO] [stdout] 1002 | | metadata: RuleMetadata { [INFO] [stdout] 1003 | | id: "RUSTCOLA010".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1027 | | } [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] 999 + impl Default for MemUninitZeroedRule { [INFO] [stdout] 1000 + fn default() -> Self { [INFO] [stdout] 1001 + Self::new() [INFO] [stdout] 1002 + } [INFO] [stdout] 1003 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `NonNullNewUncheckedRule` [INFO] [stdout] --> src/rules/memory.rs:1099:5 [INFO] [stdout] | [INFO] [stdout] 1099 | / pub fn new() -> Self { [INFO] [stdout] 1100 | | Self { [INFO] [stdout] 1101 | | metadata: RuleMetadata { [INFO] [stdout] 1102 | | id: "RUSTCOLA073".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1114 | | } [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] 1098 + impl Default for NonNullNewUncheckedRule { [INFO] [stdout] 1099 + fn default() -> Self { [INFO] [stdout] 1100 + Self::new() [INFO] [stdout] 1101 + } [INFO] [stdout] 1102 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `MemForgetGuardRule` [INFO] [stdout] --> src/rules/memory.rs:1176:5 [INFO] [stdout] | [INFO] [stdout] 1176 | / pub fn new() -> Self { [INFO] [stdout] 1177 | | Self { [INFO] [stdout] 1178 | | metadata: RuleMetadata { [INFO] [stdout] 1179 | | id: "RUSTCOLA078".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1191 | | } [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] 1175 + impl Default for MemForgetGuardRule { [INFO] [stdout] 1176 + fn default() -> Self { [INFO] [stdout] 1177 + Self::new() [INFO] [stdout] 1178 + } [INFO] [stdout] 1179 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `StaticMutGlobalRule` [INFO] [stdout] --> src/rules/memory.rs:1279:5 [INFO] [stdout] | [INFO] [stdout] 1279 | / pub fn new() -> Self { [INFO] [stdout] 1280 | | Self { [INFO] [stdout] 1281 | | metadata: RuleMetadata { [INFO] [stdout] 1282 | | id: "RUSTCOLA025".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1294 | | } [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] 1278 + impl Default for StaticMutGlobalRule { [INFO] [stdout] 1279 + fn default() -> Self { [INFO] [stdout] 1280 + Self::new() [INFO] [stdout] 1281 + } [INFO] [stdout] 1282 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `TransmuteLifetimeChangeRule` [INFO] [stdout] --> src/rules/memory.rs:1360:5 [INFO] [stdout] | [INFO] [stdout] 1360 | / pub fn new() -> Self { [INFO] [stdout] 1361 | | Self { [INFO] [stdout] 1362 | | metadata: RuleMetadata { [INFO] [stdout] 1363 | | id: "RUSTCOLA095".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1375 | | } [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] 1359 + impl Default for TransmuteLifetimeChangeRule { [INFO] [stdout] 1360 + fn default() -> Self { [INFO] [stdout] 1361 + Self::new() [INFO] [stdout] 1362 + } [INFO] [stdout] 1363 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/memory.rs:1434:27 [INFO] [stdout] | [INFO] [stdout] 1434 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/memory.rs:1523:25 [INFO] [stdout] | [INFO] [stdout] 1523 | / if back_line.starts_with("pub fn ") || back_line.starts_with("fn ") { [INFO] [stdout] 1524 | | if !back_line.contains("->") { [INFO] [stdout] 1525 | | break; [INFO] [stdout] 1526 | | } [INFO] [stdout] 1527 | | } [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] 1523 ~ if (back_line.starts_with("pub fn ") || back_line.starts_with("fn ")) { [INFO] [stdout] 1524 ~ && !back_line.contains("->") { [INFO] [stdout] 1525 | break; [INFO] [stdout] 1526 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `RawPointerEscapeRule` [INFO] [stdout] --> src/rules/memory.rs:1634:5 [INFO] [stdout] | [INFO] [stdout] 1634 | / pub fn new() -> Self { [INFO] [stdout] 1635 | | Self { [INFO] [stdout] 1636 | | metadata: RuleMetadata { [INFO] [stdout] 1637 | | id: "RUSTCOLA096".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1649 | | } [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] 1633 + impl Default for RawPointerEscapeRule { [INFO] [stdout] 1634 + fn default() -> Self { [INFO] [stdout] 1635 + Self::new() [INFO] [stdout] 1636 + } [INFO] [stdout] 1637 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/memory.rs:1710:9 [INFO] [stdout] | [INFO] [stdout] 1710 | / if (line.starts_with("*") && line.contains(" = ")) [INFO] [stdout] 1711 | | && (line.contains("as *const") || line.contains("as *mut")) [INFO] [stdout] 1712 | | { [INFO] [stdout] 1713 | | if line.contains("&") { [INFO] [stdout] ... | [INFO] [stdout] 1716 | | } [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] 1711 ~ && (line.contains("as *const") || line.contains("as *mut")) [INFO] [stdout] 1712 ~ && line.contains("&") { [INFO] [stdout] 1713 | return true; [INFO] [stdout] 1714 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/memory.rs:1718:9 [INFO] [stdout] | [INFO] [stdout] 1718 | / if line.contains("GLOBAL") || line.contains("STATIC") { [INFO] [stdout] 1719 | | if line.contains("as *const") || line.contains("as *mut") { [INFO] [stdout] 1720 | | return true; [INFO] [stdout] 1721 | | } [INFO] [stdout] 1722 | | } [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] 1718 ~ if (line.contains("GLOBAL") || line.contains("STATIC")) { [INFO] [stdout] 1719 ~ && (line.contains("as *const") || line.contains("as *mut")) { [INFO] [stdout] 1720 | return true; [INFO] [stdout] 1721 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/memory.rs:1730:9 [INFO] [stdout] | [INFO] [stdout] 1730 | / if fn_context.contains("fn ") && fn_context.contains("(&") { [INFO] [stdout] 1731 | | if !line.contains("let ") && (line.contains(" x ") || line.contains("(x)")) { [INFO] [stdout] 1732 | | return true; [INFO] [stdout] 1733 | | } [INFO] [stdout] 1734 | | } [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] 1730 ~ if fn_context.contains("fn ") && fn_context.contains("(&") [INFO] [stdout] 1731 ~ && !line.contains("let ") && (line.contains(" x ") || line.contains("(x)")) { [INFO] [stdout] 1732 | return true; [INFO] [stdout] 1733 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/rules/memory.rs:1760:34 [INFO] [stdout] | [INFO] [stdout] 1760 | let next_lines: String = lines[idx..std::cmp::min(idx + 5, lines.len())] [INFO] [stdout] | __________________________________^ [INFO] [stdout] 1761 | | .iter() [INFO] [stdout] 1762 | | .map(|s| *s) [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 1760 ~ let next_lines: String = lines[idx..std::cmp::min(idx + 5, lines.len())] [INFO] [stdout] 1761 + .iter().copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/rules/memory.rs:1892:24 [INFO] [stdout] | [INFO] [stdout] 1892 | if ((returns_ptr || escapes_via_return || escapes_via_store) && is_local_cast) [INFO] [stdout] | ________________________^ [INFO] [stdout] 1893 | | || (is_deref_assign && is_local_cast) [INFO] [stdout] | |_____________________________________________________________^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 1892 - if ((returns_ptr || escapes_via_return || escapes_via_store) && is_local_cast) [INFO] [stdout] 1893 - || (is_deref_assign && is_local_cast) [INFO] [stdout] 1892 + if !(!is_local_cast || !returns_ptr && !escapes_via_return && !escapes_via_store && !is_deref_assign) [INFO] [stdout] | [INFO] [stdout] 1892 - if ((returns_ptr || escapes_via_return || escapes_via_store) && is_local_cast) [INFO] [stdout] 1893 - || (is_deref_assign && is_local_cast) [INFO] [stdout] 1892 + if (is_deref_assign || escapes_via_store || escapes_via_return || returns_ptr) && is_local_cast [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/memory.rs:1796:27 [INFO] [stdout] | [INFO] [stdout] 1796 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you are using an explicit closure for copying elements [INFO] [stdout] --> src/rules/memory.rs:1854:46 [INFO] [stdout] | [INFO] [stdout] 1854 | let fn_context: String = lines[current_fn_start..=idx.min(lines.len() - 1)] [INFO] [stdout] | ______________________________________________^ [INFO] [stdout] 1855 | | .iter() [INFO] [stdout] 1856 | | .take(20) [INFO] [stdout] 1857 | | .map(|s| *s) [INFO] [stdout] | |____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 1854 ~ let fn_context: String = lines[current_fn_start..=idx.min(lines.len() - 1)] [INFO] [stdout] 1855 + .iter() [INFO] [stdout] 1856 + .take(20).copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `VecSetLenMisuseRule` [INFO] [stdout] --> src/rules/memory.rs:1930:5 [INFO] [stdout] | [INFO] [stdout] 1930 | / pub fn new() -> Self { [INFO] [stdout] 1931 | | Self { [INFO] [stdout] 1932 | | metadata: RuleMetadata { [INFO] [stdout] 1933 | | id: "RUSTCOLA038".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1945 | | } [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] 1929 + impl Default for VecSetLenMisuseRule { [INFO] [stdout] 1930 + fn default() -> Self { [INFO] [stdout] 1931 + Self::new() [INFO] [stdout] 1932 + } [INFO] [stdout] 1933 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/memory.rs:1985:27 [INFO] [stdout] | [INFO] [stdout] 1985 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `LengthTruncationCastRule` [INFO] [stdout] --> src/rules/memory.rs:2103:5 [INFO] [stdout] | [INFO] [stdout] 2103 | / pub fn new() -> Self { [INFO] [stdout] 2104 | | Self { [INFO] [stdout] 2105 | | metadata: RuleMetadata { [INFO] [stdout] 2106 | | id: "RUSTCOLA022".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 2118 | | } [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] 2102 + impl Default for LengthTruncationCastRule { [INFO] [stdout] 2103 + fn default() -> Self { [INFO] [stdout] 2104 + Self::new() [INFO] [stdout] 2105 + } [INFO] [stdout] 2106 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `MaybeUninitAssumeInitDataflowRule` [INFO] [stdout] --> src/rules/memory.rs:2189:5 [INFO] [stdout] | [INFO] [stdout] 2189 | / pub fn new() -> Self { [INFO] [stdout] 2190 | | Self { [INFO] [stdout] 2191 | | metadata: RuleMetadata { [INFO] [stdout] 2192 | | id: "RUSTCOLA078".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 2211 | | } [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] 2188 + impl Default for MaybeUninitAssumeInitDataflowRule { [INFO] [stdout] 2189 + fn default() -> Self { [INFO] [stdout] 2190 + Self::new() [INFO] [stdout] 2191 + } [INFO] [stdout] 2192 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SliceElementSizeMismatchRule` [INFO] [stdout] --> src/rules/memory.rs:2361:5 [INFO] [stdout] | [INFO] [stdout] 2361 | / pub fn new() -> Self { [INFO] [stdout] 2362 | | Self { [INFO] [stdout] 2363 | | metadata: RuleMetadata { [INFO] [stdout] 2364 | | id: "RUSTCOLA082".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 2381 | | } [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] 2360 + impl Default for SliceElementSizeMismatchRule { [INFO] [stdout] 2361 + fn default() -> Self { [INFO] [stdout] 2362 + Self::new() [INFO] [stdout] 2363 + } [INFO] [stdout] 2364 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SliceFromRawPartsRule` [INFO] [stdout] --> src/rules/memory.rs:2756:5 [INFO] [stdout] | [INFO] [stdout] 2756 | / pub fn new() -> Self { [INFO] [stdout] 2757 | | Self { [INFO] [stdout] 2758 | | metadata: RuleMetadata { [INFO] [stdout] 2759 | | id: "RUSTCOLA083".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 2777 | | } [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] 2755 + impl Default for SliceFromRawPartsRule { [INFO] [stdout] 2756 + fn default() -> Self { [INFO] [stdout] 2757 + Self::new() [INFO] [stdout] 2758 + } [INFO] [stdout] 2759 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/memory.rs:2784:17 [INFO] [stdout] | [INFO] [stdout] 2784 | / if line.contains(&format!("{} = ", var_name)) { [INFO] [stdout] 2785 | | if line.contains("::len(") [INFO] [stdout] 2786 | | || line.contains(">::len(") [INFO] [stdout] 2787 | | || line.contains(".len()") [INFO] [stdout] ... | [INFO] [stdout] 2791 | | } [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] 2784 ~ if line.contains(&format!("{} = ", var_name)) [INFO] [stdout] 2785 ~ && (line.contains("::len(") [INFO] [stdout] 2786 | || line.contains(">::len(") [INFO] [stdout] 2787 ~ || line.contains(".len()")) [INFO] [stdout] 2788 | { [INFO] [stdout] 2789 | return true; [INFO] [stdout] 2790 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/memory.rs:2795:9 [INFO] [stdout] | [INFO] [stdout] 2795 | / if var_name.contains("count") { [INFO] [stdout] 2796 | | if body_str.contains("Layout::array") || body_str.contains("with_capacity") { [INFO] [stdout] 2797 | | return true; [INFO] [stdout] 2798 | | } [INFO] [stdout] 2799 | | } [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] 2795 ~ if var_name.contains("count") [INFO] [stdout] 2796 ~ && (body_str.contains("Layout::array") || body_str.contains("with_capacity")) { [INFO] [stdout] 2797 | return true; [INFO] [stdout] 2798 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/memory.rs:2824:9 [INFO] [stdout] | [INFO] [stdout] 2824 | / if body_str.contains("::min(") { [INFO] [stdout] 2825 | | if body_str.contains(&format!("copy {}", len_var)) [INFO] [stdout] 2826 | | || body_str.contains(&format!("move {}", len_var)) [INFO] [stdout] ... | [INFO] [stdout] 2834 | | } [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] 2824 ~ if body_str.contains("::min(") [INFO] [stdout] 2825 ~ && (body_str.contains(&format!("copy {}", len_var)) [INFO] [stdout] 2826 ~ || body_str.contains(&format!("move {}", len_var))) [INFO] [stdout] 2827 | { [INFO] [stdout] ... [INFO] [stdout] 2832 | } [INFO] [stdout] 2833 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/memory.rs:2852:13 [INFO] [stdout] | [INFO] [stdout] 2852 | / if line.contains("assert") { [INFO] [stdout] 2853 | | if line.contains(&format!("Le(copy {}", len_var)) [INFO] [stdout] 2854 | | || line.contains(&format!("Lt(copy {}", len_var)) [INFO] [stdout] 2855 | | || line.contains(&format!("Le(move {}", len_var)) [INFO] [stdout] ... | [INFO] [stdout] 2860 | | } [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] 2852 ~ if line.contains("assert") [INFO] [stdout] 2853 ~ && (line.contains(&format!("Le(copy {}", len_var)) [INFO] [stdout] 2854 | || line.contains(&format!("Lt(copy {}", len_var)) [INFO] [stdout] 2855 | || line.contains(&format!("Le(move {}", len_var)) [INFO] [stdout] 2856 ~ || line.contains(&format!("Lt(move {}", len_var))) [INFO] [stdout] 2857 | { [INFO] [stdout] 2858 | return true; [INFO] [stdout] 2859 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/memory.rs:2884:9 [INFO] [stdout] | [INFO] [stdout] 2884 | / if body_str.contains("env::var") || body_str.contains("var::<") { [INFO] [stdout] 2885 | | if body_str.contains("parse") { [INFO] [stdout] 2886 | | return true; [INFO] [stdout] 2887 | | } [INFO] [stdout] 2888 | | } [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] 2884 ~ if (body_str.contains("env::var") || body_str.contains("var::<")) { [INFO] [stdout] 2885 ~ && body_str.contains("parse") { [INFO] [stdout] 2886 | return true; [INFO] [stdout] 2887 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/memory.rs:2968:13 [INFO] [stdout] | [INFO] [stdout] 2968 | / if trimmed.contains(&format!("{} = Div(", len_var)) { [INFO] [stdout] 2969 | | if trimmed.contains("const 2_usize") { [INFO] [stdout] 2970 | | return Some("length divided by 2 may not match element size".to_string()); [INFO] [stdout] 2971 | | } [INFO] [stdout] 2972 | | } [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] 2968 ~ if trimmed.contains(&format!("{} = Div(", len_var)) [INFO] [stdout] 2969 ~ && trimmed.contains("const 2_usize") { [INFO] [stdout] 2970 | return Some("length divided by 2 may not match element size".to_string()); [INFO] [stdout] 2971 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `VarianceTransmuteUnsoundRule` [INFO] [stdout] --> src/rules/memory.rs:3193:5 [INFO] [stdout] | [INFO] [stdout] 3193 | / pub fn new() -> Self { [INFO] [stdout] 3194 | | Self { [INFO] [stdout] 3195 | | metadata: RuleMetadata { [INFO] [stdout] 3196 | | id: "RUSTCOLA101".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 3209 | | } [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] 3192 + impl Default for VarianceTransmuteUnsoundRule { [INFO] [stdout] 3193 + fn default() -> Self { [INFO] [stdout] 3194 + Self::new() [INFO] [stdout] 3195 + } [INFO] [stdout] 3196 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ReturnedRefToLocalRule` [INFO] [stdout] --> src/rules/memory.rs:3388:5 [INFO] [stdout] | [INFO] [stdout] 3388 | / pub fn new() -> Self { [INFO] [stdout] 3389 | | Self { [INFO] [stdout] 3390 | | metadata: RuleMetadata { [INFO] [stdout] 3391 | | id: "RUSTCOLA118".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 3406 | | } [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] 3387 + impl Default for ReturnedRefToLocalRule { [INFO] [stdout] 3388 + fn default() -> Self { [INFO] [stdout] 3389 + Self::new() [INFO] [stdout] 3390 + } [INFO] [stdout] 3391 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/memory.rs:3444:27 [INFO] [stdout] | [INFO] [stdout] 3444 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `SelfReferentialStructRule` [INFO] [stdout] --> src/rules/memory.rs:3612:5 [INFO] [stdout] | [INFO] [stdout] 3612 | / pub fn new() -> Self { [INFO] [stdout] 3613 | | Self { [INFO] [stdout] 3614 | | metadata: RuleMetadata { [INFO] [stdout] 3615 | | id: "RUSTCOLA120".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 3631 | | } [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] 3611 + impl Default for SelfReferentialStructRule { [INFO] [stdout] 3612 + fn default() -> Self { [INFO] [stdout] 3613 + Self::new() [INFO] [stdout] 3614 + } [INFO] [stdout] 3615 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/memory.rs:3670:27 [INFO] [stdout] | [INFO] [stdout] 3670 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/rules/memory.rs:3725:36 [INFO] [stdout] | [INFO] [stdout] 3725 | ... .split(|c| c == '<' || c == ' ' || c == '{') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['<', ' ', '{']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/rules/memory.rs:3732:36 [INFO] [stdout] | [INFO] [stdout] 3732 | ... .split(|c| c == '<' || c == ' ' || c == '{') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['<', ' ', '{']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UnsafeCellAliasingRule` [INFO] [stdout] --> src/rules/memory.rs:3804:5 [INFO] [stdout] | [INFO] [stdout] 3804 | / pub fn new() -> Self { [INFO] [stdout] 3805 | | Self { [INFO] [stdout] 3806 | | metadata: RuleMetadata { [INFO] [stdout] 3807 | | id: "RUSTCOLA128".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 3826 | | } [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] 3803 + impl Default for UnsafeCellAliasingRule { [INFO] [stdout] 3804 + fn default() -> Self { [INFO] [stdout] 3805 + Self::new() [INFO] [stdout] 3806 + } [INFO] [stdout] 3807 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `LazyInitPanicPoisonRule` [INFO] [stdout] --> src/rules/memory.rs:3996:5 [INFO] [stdout] | [INFO] [stdout] 3996 | / pub fn new() -> Self { [INFO] [stdout] 3997 | | Self { [INFO] [stdout] 3998 | | metadata: RuleMetadata { [INFO] [stdout] 3999 | | id: "RUSTCOLA129".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 4015 | | } [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] 3995 + impl Default for LazyInitPanicPoisonRule { [INFO] [stdout] 3996 + fn default() -> Self { [INFO] [stdout] 3997 + Self::new() [INFO] [stdout] 3998 + } [INFO] [stdout] 3999 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SpawnedChildNoWaitRule` [INFO] [stdout] --> src/rules/resource.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | / pub fn new() -> Self { [INFO] [stdout] 35 | | Self { [INFO] [stdout] 36 | | metadata: RuleMetadata { [INFO] [stdout] 37 | | id: "RUSTCOLA067".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 53 | | } [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] 33 + impl Default for SpawnedChildNoWaitRule { [INFO] [stdout] 34 + fn default() -> Self { [INFO] [stdout] 35 + Self::new() [INFO] [stdout] 36 + } [INFO] [stdout] 37 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PermissionsSetReadonlyFalseRule` [INFO] [stdout] --> src/rules/resource.rs:145:5 [INFO] [stdout] | [INFO] [stdout] 145 | / pub fn new() -> Self { [INFO] [stdout] 146 | | Self { [INFO] [stdout] 147 | | metadata: RuleMetadata { [INFO] [stdout] 148 | | id: "RUSTCOLA028".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 163 | | } [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] 144 + impl Default for PermissionsSetReadonlyFalseRule { [INFO] [stdout] 145 + fn default() -> Self { [INFO] [stdout] 146 + Self::new() [INFO] [stdout] 147 + } [INFO] [stdout] 148 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `WorldWritableModeRule` [INFO] [stdout] --> src/rules/resource.rs:231:5 [INFO] [stdout] | [INFO] [stdout] 231 | / pub fn new() -> Self { [INFO] [stdout] 232 | | Self { [INFO] [stdout] 233 | | metadata: RuleMetadata { [INFO] [stdout] 234 | | id: "RUSTCOLA029".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 249 | | } [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] 230 + impl Default for WorldWritableModeRule { [INFO] [stdout] 231 + fn default() -> Self { [INFO] [stdout] 232 + Self::new() [INFO] [stdout] 233 + } [INFO] [stdout] 234 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `OpenOptionsMissingTruncateRule` [INFO] [stdout] --> src/rules/resource.rs:314:5 [INFO] [stdout] | [INFO] [stdout] 314 | / pub fn new() -> Self { [INFO] [stdout] 315 | | Self { [INFO] [stdout] 316 | | metadata: RuleMetadata { [INFO] [stdout] 317 | | id: "RUSTCOLA032".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 331 | | } [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] 313 + impl Default for OpenOptionsMissingTruncateRule { [INFO] [stdout] 314 + fn default() -> Self { [INFO] [stdout] 315 + Self::new() [INFO] [stdout] 316 + } [INFO] [stdout] 317 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UnixPermissionsNotOctalRule` [INFO] [stdout] --> src/rules/resource.rs:442:5 [INFO] [stdout] | [INFO] [stdout] 442 | / pub fn new() -> Self { [INFO] [stdout] 443 | | Self { [INFO] [stdout] 444 | | metadata: RuleMetadata { [INFO] [stdout] 445 | | id: "RUSTCOLA055".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 462 | | } [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] 441 + impl Default for UnixPermissionsNotOctalRule { [INFO] [stdout] 442 + fn default() -> Self { [INFO] [stdout] 443 + Self::new() [INFO] [stdout] 444 + } [INFO] [stdout] 445 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `OpenOptionsInconsistentFlagsRule` [INFO] [stdout] --> src/rules/resource.rs:560:5 [INFO] [stdout] | [INFO] [stdout] 560 | / pub fn new() -> Self { [INFO] [stdout] 561 | | Self { [INFO] [stdout] 562 | | metadata: RuleMetadata { [INFO] [stdout] 563 | | id: "RUSTCOLA056".to_string(), [INFO] [stdout] ... | [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 559 + impl Default for OpenOptionsInconsistentFlagsRule { [INFO] [stdout] 560 + fn default() -> Self { [INFO] [stdout] 561 + Self::new() [INFO] [stdout] 562 + } [INFO] [stdout] 563 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `AbsolutePathInJoinRule` [INFO] [stdout] --> src/rules/resource.rs:675:5 [INFO] [stdout] | [INFO] [stdout] 675 | / pub fn new() -> Self { [INFO] [stdout] 676 | | Self { [INFO] [stdout] 677 | | metadata: RuleMetadata { [INFO] [stdout] 678 | | id: "RUSTCOLA058".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 694 | | } [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] 674 + impl Default for AbsolutePathInJoinRule { [INFO] [stdout] 675 + fn default() -> Self { [INFO] [stdout] 676 + Self::new() [INFO] [stdout] 677 + } [INFO] [stdout] 678 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `HardcodedHomePathRule` [INFO] [stdout] --> src/rules/resource.rs:807:5 [INFO] [stdout] | [INFO] [stdout] 807 | / pub fn new() -> Self { [INFO] [stdout] 808 | | Self { [INFO] [stdout] 809 | | metadata: RuleMetadata { [INFO] [stdout] 810 | | id: "RUSTCOLA014".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 822 | | } [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] 806 + impl Default for HardcodedHomePathRule { [INFO] [stdout] 807 + fn default() -> Self { [INFO] [stdout] 808 + Self::new() [INFO] [stdout] 809 + } [INFO] [stdout] 810 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `BuildScriptNetworkRule` [INFO] [stdout] --> src/rules/resource.rs:927:5 [INFO] [stdout] | [INFO] [stdout] 927 | / pub fn new() -> Self { [INFO] [stdout] 928 | | Self { [INFO] [stdout] 929 | | metadata: RuleMetadata { [INFO] [stdout] 930 | | id: "RUSTCOLA097".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 942 | | } [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] 926 + impl Default for BuildScriptNetworkRule { [INFO] [stdout] 927 + fn default() -> Self { [INFO] [stdout] 928 + Self::new() [INFO] [stdout] 929 + } [INFO] [stdout] 930 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UnboundedAllocationRule` [INFO] [stdout] --> src/rules/resource.rs:1093:5 [INFO] [stdout] | [INFO] [stdout] 1093 | / pub fn new() -> Self { [INFO] [stdout] 1094 | | Self { [INFO] [stdout] 1095 | | metadata: RuleMetadata { [INFO] [stdout] 1096 | | id: "RUSTCOLA024".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1108 | | } [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] 1092 + impl Default for UnboundedAllocationRule { [INFO] [stdout] 1093 + fn default() -> Self { [INFO] [stdout] 1094 + Self::new() [INFO] [stdout] 1095 + } [INFO] [stdout] 1096 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `RustsecUnsoundDependencyRule` [INFO] [stdout] --> src/rules/supply_chain.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | / pub fn new() -> Self { [INFO] [stdout] 37 | | Self { [INFO] [stdout] 38 | | metadata: RuleMetadata { [INFO] [stdout] 39 | | id: "RUSTCOLA018".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 51 | | } [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] 35 + impl Default for RustsecUnsoundDependencyRule { [INFO] [stdout] 36 + fn default() -> Self { [INFO] [stdout] 37 + Self::new() [INFO] [stdout] 38 + } [INFO] [stdout] 39 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `YankedCrateRule` [INFO] [stdout] --> src/rules/supply_chain.rs:211:5 [INFO] [stdout] | [INFO] [stdout] 211 | / pub fn new() -> Self { [INFO] [stdout] 212 | | Self { [INFO] [stdout] 213 | | metadata: RuleMetadata { [INFO] [stdout] 214 | | id: "RUSTCOLA019".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 231 | | } [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] 210 + impl Default for YankedCrateRule { [INFO] [stdout] 211 + fn default() -> Self { [INFO] [stdout] 212 + Self::new() [INFO] [stdout] 213 + } [INFO] [stdout] 214 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `CargoAuditableMetadataRule` [INFO] [stdout] --> src/rules/supply_chain.rs:337:5 [INFO] [stdout] | [INFO] [stdout] 337 | / pub fn new() -> Self { [INFO] [stdout] 338 | | Self { [INFO] [stdout] 339 | | metadata: RuleMetadata { [INFO] [stdout] 340 | | id: "RUSTCOLA020".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 352 | | } [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] 336 + impl Default for CargoAuditableMetadataRule { [INFO] [stdout] 337 + fn default() -> Self { [INFO] [stdout] 338 + Self::new() [INFO] [stdout] 339 + } [INFO] [stdout] 340 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/rules/supply_chain.rs:388:24 [INFO] [stdout] | [INFO] [stdout] 388 | && path [INFO] [stdout] | ________________________^ [INFO] [stdout] 389 | | .extension() [INFO] [stdout] 390 | | .and_then(OsStr::to_str) [INFO] [stdout] 391 | | .map_or(false, |ext| ext.eq_ignore_ascii_case("rs")) [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] 391 - .map_or(false, |ext| ext.eq_ignore_ascii_case("rs")) [INFO] [stdout] 391 + .is_some_and(|ext| ext.eq_ignore_ascii_case("rs")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/rules/supply_chain.rs:458:93 [INFO] [stdout] | [INFO] [stdout] 458 | ...y(items) if items.iter().any(|item| item.as_str().map_or(false, |s| s.contains("auditable")))) [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] 458 - || matches!(value, toml::Value::Array(items) if items.iter().any(|item| item.as_str().map_or(false, |s| s.contains("auditable")))) [INFO] [stdout] 458 + || matches!(value, toml::Value::Array(items) if items.iter().any(|item| item.as_str().is_some_and(|s| s.contains("auditable")))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ProcMacroSideEffectsRule` [INFO] [stdout] --> src/rules/supply_chain.rs:658:5 [INFO] [stdout] | [INFO] [stdout] 658 | / pub fn new() -> Self { [INFO] [stdout] 659 | | Self { [INFO] [stdout] 660 | | metadata: RuleMetadata { [INFO] [stdout] 661 | | id: "RUSTCOLA102".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 679 | | } [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] 657 + impl Default for ProcMacroSideEffectsRule { [INFO] [stdout] 658 + fn default() -> Self { [INFO] [stdout] 659 + Self::new() [INFO] [stdout] 660 + } [INFO] [stdout] 661 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/supply_chain.rs:743:27 [INFO] [stdout] | [INFO] [stdout] 743 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `NonHttpsUrlRule` [INFO] [stdout] --> src/rules/web.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | / pub fn new() -> Self { [INFO] [stdout] 31 | | Self { [INFO] [stdout] 32 | | metadata: RuleMetadata { [INFO] [stdout] 33 | | id: "RUSTCOLA011".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 45 | | } [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] 29 + impl Default for NonHttpsUrlRule { [INFO] [stdout] 30 + fn default() -> Self { [INFO] [stdout] 31 + Self::new() [INFO] [stdout] 32 + } [INFO] [stdout] 33 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `DangerAcceptInvalidCertRule` [INFO] [stdout] --> src/rules/web.rs:153:5 [INFO] [stdout] | [INFO] [stdout] 153 | / pub fn new() -> Self { [INFO] [stdout] 154 | | Self { [INFO] [stdout] 155 | | metadata: RuleMetadata { [INFO] [stdout] 156 | | id: "RUSTCOLA012".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 168 | | } [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] 152 + impl Default for DangerAcceptInvalidCertRule { [INFO] [stdout] 153 + fn default() -> Self { [INFO] [stdout] 154 + Self::new() [INFO] [stdout] 155 + } [INFO] [stdout] 156 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `OpensslVerifyNoneRule` [INFO] [stdout] --> src/rules/web.rs:293:5 [INFO] [stdout] | [INFO] [stdout] 293 | / pub fn new() -> Self { [INFO] [stdout] 294 | | Self { [INFO] [stdout] 295 | | metadata: RuleMetadata { [INFO] [stdout] 296 | | id: "RUSTCOLA013".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 308 | | } [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] 292 + impl Default for OpensslVerifyNoneRule { [INFO] [stdout] 293 + fn default() -> Self { [INFO] [stdout] 294 + Self::new() [INFO] [stdout] 295 + } [INFO] [stdout] 296 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `CookieSecureAttributeRule` [INFO] [stdout] --> src/rules/web.rs:379:5 [INFO] [stdout] | [INFO] [stdout] 379 | / pub fn new() -> Self { [INFO] [stdout] 380 | | Self { [INFO] [stdout] 381 | | metadata: RuleMetadata { [INFO] [stdout] 382 | | id: "RUSTCOLA042".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 394 | | } [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] 378 + impl Default for CookieSecureAttributeRule { [INFO] [stdout] 379 + fn default() -> Self { [INFO] [stdout] 380 + Self::new() [INFO] [stdout] 381 + } [INFO] [stdout] 382 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `CorsWildcardRule` [INFO] [stdout] --> src/rules/web.rs:468:5 [INFO] [stdout] | [INFO] [stdout] 468 | / pub fn new() -> Self { [INFO] [stdout] 469 | | Self { [INFO] [stdout] 470 | | metadata: RuleMetadata { [INFO] [stdout] 471 | | id: "RUSTCOLA043".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 483 | | } [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] 467 + impl Default for CorsWildcardRule { [INFO] [stdout] 468 + fn default() -> Self { [INFO] [stdout] 469 + Self::new() [INFO] [stdout] 470 + } [INFO] [stdout] 471 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ConnectionStringPasswordRule` [INFO] [stdout] --> src/rules/web.rs:548:5 [INFO] [stdout] | [INFO] [stdout] 548 | / pub fn new() -> Self { [INFO] [stdout] 549 | | Self { [INFO] [stdout] 550 | | metadata: RuleMetadata { [INFO] [stdout] 551 | | id: "RUSTCOLA060".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 564 | | } [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] 547 + impl Default for ConnectionStringPasswordRule { [INFO] [stdout] 548 + fn default() -> Self { [INFO] [stdout] 549 + Self::new() [INFO] [stdout] 550 + } [INFO] [stdout] 551 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PasswordFieldMaskingRule` [INFO] [stdout] --> src/rules/web.rs:635:5 [INFO] [stdout] | [INFO] [stdout] 635 | / pub fn new() -> Self { [INFO] [stdout] 636 | | Self { [INFO] [stdout] 637 | | metadata: RuleMetadata { [INFO] [stdout] 638 | | id: "RUSTCOLA061".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 650 | | } [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] 634 + impl Default for PasswordFieldMaskingRule { [INFO] [stdout] 635 + fn default() -> Self { [INFO] [stdout] 636 + Self::new() [INFO] [stdout] 637 + } [INFO] [stdout] 638 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `CleartextLoggingRule` [INFO] [stdout] --> src/rules/web.rs:729:5 [INFO] [stdout] | [INFO] [stdout] 729 | / pub fn new() -> Self { [INFO] [stdout] 730 | | Self { [INFO] [stdout] 731 | | metadata: RuleMetadata { [INFO] [stdout] 732 | | id: "RUSTCOLA075".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 746 | | } [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] 728 + impl Default for CleartextLoggingRule { [INFO] [stdout] 729 + fn default() -> Self { [INFO] [stdout] 730 + Self::new() [INFO] [stdout] 731 + } [INFO] [stdout] 732 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `TlsVerificationDisabledRule` [INFO] [stdout] --> src/rules/web.rs:824:5 [INFO] [stdout] | [INFO] [stdout] 824 | / pub fn new() -> Self { [INFO] [stdout] 825 | | Self { [INFO] [stdout] 826 | | metadata: RuleMetadata { [INFO] [stdout] 827 | | id: "RUSTCOLA084".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 844 | | } [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] 823 + impl Default for TlsVerificationDisabledRule { [INFO] [stdout] 824 + fn default() -> Self { [INFO] [stdout] 825 + Self::new() [INFO] [stdout] 826 + } [INFO] [stdout] 827 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `AwsS3UnscopedAccessRule` [INFO] [stdout] --> src/rules/web.rs:1012:5 [INFO] [stdout] | [INFO] [stdout] 1012 | / pub fn new() -> Self { [INFO] [stdout] 1013 | | Self { [INFO] [stdout] 1014 | | metadata: RuleMetadata { [INFO] [stdout] 1015 | | id: "RUSTCOLA085".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1032 | | } [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] 1011 + impl Default for AwsS3UnscopedAccessRule { [INFO] [stdout] 1012 + fn default() -> Self { [INFO] [stdout] 1013 + Self::new() [INFO] [stdout] 1014 + } [INFO] [stdout] 1015 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `lines` [INFO] [stdout] --> src/rules/web.rs:1037:18 [INFO] [stdout] | [INFO] [stdout] 1037 | for i in 0..s3_call_idx { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 1037 - for i in 0..s3_call_idx { [INFO] [stdout] 1037 + for in lines.iter().take(s3_call_idx) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/rules/web.rs:1074:67 [INFO] [stdout] | [INFO] [stdout] 1074 | if method.contains("delete") || method.contains("Delete") { [INFO] [stdout] | ___________________________________________________________________^ [INFO] [stdout] 1075 | | Severity::High // Deletion is most dangerous (using High since no Critical) [INFO] [stdout] 1076 | | } else if method.contains("put") || method.contains("Put") || method.contains("copy") { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/rules/web.rs:1076:95 [INFO] [stdout] | [INFO] [stdout] 1076 | } else if method.contains("put") || method.contains("Put") || method.contains("copy") { [INFO] [stdout] | _______________________________________________________________________________________________^ [INFO] [stdout] 1077 | | Severity::High // Write operations [INFO] [stdout] 1078 | | } else { [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: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/rules/web.rs:1112:45 [INFO] [stdout] | [INFO] [stdout] 1112 | for (_idx, line) in lines.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 1112 - for (_idx, line) in lines.iter().enumerate() { [INFO] [stdout] 1112 + for line in lines.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ContentLengthAllocationRule` [INFO] [stdout] --> src/rules/web.rs:1372:5 [INFO] [stdout] | [INFO] [stdout] 1372 | / pub fn new() -> Self { [INFO] [stdout] 1373 | | Self { [INFO] [stdout] 1374 | | metadata: RuleMetadata { [INFO] [stdout] 1375 | | id: "RUSTCOLA021".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1388 | | } [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] 1371 + impl Default for ContentLengthAllocationRule { [INFO] [stdout] 1372 + fn default() -> Self { [INFO] [stdout] 1373 + Self::new() [INFO] [stdout] 1374 + } [INFO] [stdout] 1375 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/lib.rs:136:1 [INFO] [stdout] | [INFO] [stdout] 136 | / impl Default for Confidence { [INFO] [stdout] 137 | | fn default() -> Self { [INFO] [stdout] 138 | | Confidence::Medium [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#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] 120 + #[derive(Default)] [INFO] [stdout] 121 | pub enum Confidence { [INFO] [stdout] 122 | Low, [INFO] [stdout] 123 ~ #[default] [INFO] [stdout] 124 ~ Medium, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/lib.rs:482:5 [INFO] [stdout] | [INFO] [stdout] 482 | / pub fn new( [INFO] [stdout] 483 | | rule_id: impl Into, [INFO] [stdout] 484 | | rule_name: impl Into, [INFO] [stdout] 485 | | severity: Severity, [INFO] [stdout] ... | [INFO] [stdout] 490 | | span: Option, [INFO] [stdout] 491 | | ) -> Self { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/lib.rs:604:1 [INFO] [stdout] | [INFO] [stdout] 604 | / impl Default for MirFunction { [INFO] [stdout] 605 | | fn default() -> Self { [INFO] [stdout] 606 | | Self { [INFO] [stdout] 607 | | name: String::new(), [INFO] [stdout] ... | [INFO] [stdout] 614 | | } [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 [INFO] [stdout] | [INFO] [stdout] 595 + #[derive(Default)] [INFO] [stdout] 596 | pub struct MirFunction { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:950:5 [INFO] [stdout] | [INFO] [stdout] 950 | / if lower.contains("ripemd") { [INFO] [stdout] 951 | | if lower.contains("ripemd::") [INFO] [stdout] 952 | | || lower.contains("::ripemd") [INFO] [stdout] 953 | | || lower.contains("ripemd128") [INFO] [stdout] ... | [INFO] [stdout] 960 | | } [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] 950 ~ if lower.contains("ripemd") [INFO] [stdout] 951 ~ && (lower.contains("ripemd::") [INFO] [stdout] 952 | || lower.contains("::ripemd") [INFO] [stdout] ... [INFO] [stdout] 955 | || lower.contains("ripemd256") [INFO] [stdout] 956 ~ || lower.contains("ripemd320")) [INFO] [stdout] 957 | { [INFO] [stdout] 958 | return true; [INFO] [stdout] 959 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `RuleEngine` [INFO] [stdout] --> src/lib.rs:1270:5 [INFO] [stdout] | [INFO] [stdout] 1270 | / pub fn new() -> Self { [INFO] [stdout] 1271 | | Self { [INFO] [stdout] 1272 | | rules: Vec::new(), [INFO] [stdout] 1273 | | suppressions: Vec::new(), [INFO] [stdout] ... | [INFO] [stdout] 1276 | | } [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] 1269 + impl Default for RuleEngine { [INFO] [stdout] 1270 + fn default() -> Self { [INFO] [stdout] 1271 + Self::new() [INFO] [stdout] 1272 + } [INFO] [stdout] 1273 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/lib.rs:1379:27 [INFO] [stdout] | [INFO] [stdout] 1379 | hasher.update(&[0u8]); [INFO] [stdout] | ^^^^^^ help: change this to: `[0u8]` [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: unneeded use of `concat!` macro [INFO] [stdout] --> src/lib.rs:1463:33 [INFO] [stdout] | [INFO] [stdout] 1463 | const MEM_MODULE_SYMBOL: &str = concat!("mem"); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace with: `"mem"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_concat [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded use of `concat!` macro [INFO] [stdout] --> src/lib.rs:1464:40 [INFO] [stdout] | [INFO] [stdout] 1464 | const MEM_UNINITIALIZED_SYMBOL: &str = concat!("uninitialized"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `"uninitialized"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_concat [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded use of `concat!` macro [INFO] [stdout] --> src/lib.rs:1465:33 [INFO] [stdout] | [INFO] [stdout] 1465 | const MEM_ZEROED_SYMBOL: &str = concat!("zeroed"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace with: `"zeroed"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_concat [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used consecutive `str::replace` call [INFO] [stdout] --> src/lib.rs:1657:14 [INFO] [stdout] | [INFO] [stdout] 1657 | .replace('\\', "::") [INFO] [stdout] | ______________^ [INFO] [stdout] 1658 | | .replace('/', "::") [INFO] [stdout] | |_______________________________^ help: replace with: `replace(['\\', '/'], "::")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace [INFO] [stdout] = note: `#[warn(clippy::collapsible_str_replace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/lib.rs:2113:27 [INFO] [stdout] | [INFO] [stdout] 2113 | hasher.update(&[0u8]); [INFO] [stdout] | ^^^^^^ help: change this to: `[0u8]` [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] --> src/lib.rs:2115:27 [INFO] [stdout] | [INFO] [stdout] 2115 | hasher.update(&[0u8]); [INFO] [stdout] | ^^^^^^ help: change this to: `[0u8]` [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] --> src/lib.rs:2118:31 [INFO] [stdout] | [INFO] [stdout] 2118 | hasher.update(&[0u8]); [INFO] [stdout] | ^^^^^^ help: change this to: `[0u8]` [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] --> src/lib.rs:2122:31 [INFO] [stdout] | [INFO] [stdout] 2122 | hasher.update(&[0u8]); [INFO] [stdout] | ^^^^^^ help: change this to: `[0u8]` [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] --> src/lib.rs:2137:19 [INFO] [stdout] | [INFO] [stdout] 2137 | hasher.update(&[0u8]); [INFO] [stdout] | ^^^^^^ help: change this to: `[0u8]` [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: redundant closure [INFO] [stdout] --> src/lib.rs:2143:23 [INFO] [stdout] | [INFO] [stdout] 2143 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/lib.rs:2160:23 [INFO] [stdout] | [INFO] [stdout] 2160 | hasher.update(&[0u8]); [INFO] [stdout] | ^^^^^^ help: change this to: `[0u8]` [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] --> src/lib.rs:2164:23 [INFO] [stdout] | [INFO] [stdout] 2164 | hasher.update(&[0u8]); [INFO] [stdout] | ^^^^^^ help: change this to: `[0u8]` [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 import is redundant [INFO] [stdout] --> examples/test_closure_path_analysis.rs:9:1 [INFO] [stdout] | [INFO] [stdout] 9 | use serde_json; [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: unused variable: `func` [INFO] [stdout] --> tests/test_advanced_rules.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | for func in &package.functions { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_func` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/test_advanced_rules.rs:18:15 [INFO] [stdout] | [INFO] [stdout] 18 | .args(&["run", "--bin", "mir-extractor", "--", "--crate-path"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["run", "--bin", "mir-extractor", "--", "--crate-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/test_advanced_rules.rs:20:15 [INFO] [stdout] | [INFO] [stdout] 20 | .args(&["--mir-json", "target/interprocedural_adv.json"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--mir-json", "target/interprocedural_adv.json"]` [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: empty line after doc comment [INFO] [stdout] --> tests/test_v101_sql_injection_fp.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | / /// - Functions without actual SQL execution sinks [INFO] [stdout] 8 | | [INFO] [stdout] | |_^ [INFO] [stdout] 9 | use mir_extractor::rules::injection::SqlInjectionRule; [INFO] [stdout] | - the comment documents this `use` import [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the crate use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Test v1.0.1 SQL injection false positive reduction [INFO] [stdout] 2 ~ //! [INFO] [stdout] 3 ~ //! These tests verify that RUSTCOLA087 (SQL injection) correctly filters: [INFO] [stdout] 4 ~ //! - Log messages containing SQL keywords [INFO] [stdout] 5 ~ //! - CLI help text containing database terminology [INFO] [stdout] 6 ~ //! - Error messages mentioning tables/queries [INFO] [stdout] 7 ~ //! - Functions without actual SQL execution sinks [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `package` [INFO] [stdout] --> tests/test_v101_sql_injection_fp.rs:193:9 [INFO] [stdout] | [INFO] [stdout] 193 | let package = make_test_package(vec![func]); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_package` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/test_false_positives.rs:18:15 [INFO] [stdout] | [INFO] [stdout] 18 | .args(&["run", "--bin", "mir-extractor", "--", "--crate-path"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["run", "--bin", "mir-extractor", "--", "--crate-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/test_false_positives.rs:20:15 [INFO] [stdout] | [INFO] [stdout] 20 | .args(&["--mir-json", "target/interprocedural_fp.json"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--mir-json", "target/interprocedural_fp.json"]` [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/test_path_sensitive.rs:21:19 [INFO] [stdout] | [INFO] [stdout] 21 | .args(&["build", "--manifest-path"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["build", "--manifest-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/test_path_sensitive.rs:33:19 [INFO] [stdout] | [INFO] [stdout] 33 | .args(&["run", "--bin", "mir-extractor", "--", "--crate-path"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["run", "--bin", "mir-extractor", "--", "--crate-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] --> tests/test_path_sensitive.rs:35:19 [INFO] [stdout] | [INFO] [stdout] 35 | .args(&["--mir-json"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `["--mir-json"]` [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/test_function_summaries.rs:19:15 [INFO] [stdout] | [INFO] [stdout] 19 | .args(&["build", "--manifest-path"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["build", "--manifest-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/test_function_summaries.rs:31:15 [INFO] [stdout] | [INFO] [stdout] 31 | .args(&["run", "--bin", "mir-extractor", "--", "--crate-path"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["run", "--bin", "mir-extractor", "--", "--crate-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] --> tests/test_function_summaries.rs:33:15 [INFO] [stdout] | [INFO] [stdout] 33 | .args(&["--mir-json", "target/interprocedural.json"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--mir-json", "target/interprocedural.json"]` [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/test_function_summaries.rs:164:15 [INFO] [stdout] | [INFO] [stdout] 164 | .args(&["build", "--manifest-path"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["build", "--manifest-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] --> tests/test_function_summaries.rs:171:15 [INFO] [stdout] | [INFO] [stdout] 171 | .args(&["run", "--bin", "mir-extractor", "--", "extract"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["run", "--bin", "mir-extractor", "--", "extract"]` [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/test_function_summaries.rs:173:15 [INFO] [stdout] | [INFO] [stdout] 173 | .args(&["--output", "target/interprocedural.json"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--output", "target/interprocedural.json"]` [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/test_function_summaries.rs:232:19 [INFO] [stdout] | [INFO] [stdout] 232 | .args(&["build", "--manifest-path"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["build", "--manifest-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] --> tests/test_function_summaries.rs:244:19 [INFO] [stdout] | [INFO] [stdout] 244 | .args(&["run", "--bin", "mir-extractor", "--", "--crate-path"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["run", "--bin", "mir-extractor", "--", "--crate-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] --> tests/test_function_summaries.rs:246:19 [INFO] [stdout] | [INFO] [stdout] 246 | .args(&["--mir-json"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `["--mir-json"]` [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 function has too many arguments (8/7) [INFO] [stdout] --> src/dataflow/cfg.rs:448:5 [INFO] [stdout] | [INFO] [stdout] 448 | / fn dfs_paths( [INFO] [stdout] 449 | | &self, [INFO] [stdout] 450 | | current_block: &str, [INFO] [stdout] 451 | | current_path: &mut Vec, [INFO] [stdout] ... | [INFO] [stdout] 456 | | max_paths: usize, [INFO] [stdout] 457 | | ) { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/dataflow/closure.rs:124:14 [INFO] [stdout] | [INFO] [stdout] 124 | .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/dataflow/closure.rs:274:25 [INFO] [stdout] | [INFO] [stdout] 274 | rhs[5..].trim() [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/closure.rs:273:38 [INFO] [stdout] | [INFO] [stdout] 273 | let source_var = if rhs.starts_with("&mut ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 273 ~ let source_var = if let Some() = rhs.strip_prefix("&mut ") { [INFO] [stdout] 274 ~ .trim() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/dataflow/closure.rs:277:56 [INFO] [stdout] | [INFO] [stdout] 277 | } else if rhs.starts_with("copy ") { [INFO] [stdout] | ________________________________________________________^ [INFO] [stdout] 278 | | rhs[5..].trim() [INFO] [stdout] 279 | | } else if rhs.starts_with("move ") { [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/dataflow/closure.rs:279:56 [INFO] [stdout] | [INFO] [stdout] 279 | } else if rhs.starts_with("move ") { [INFO] [stdout] | ________________________________________________________^ [INFO] [stdout] 280 | | rhs[5..].trim() [INFO] [stdout] 281 | | } else { [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: stripping a prefix manually [INFO] [stdout] --> src/dataflow/closure.rs:276:25 [INFO] [stdout] | [INFO] [stdout] 276 | rhs[1..].trim() [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/closure.rs:275:28 [INFO] [stdout] | [INFO] [stdout] 275 | } else if rhs.starts_with("&") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 275 ~ } else if let Some() = rhs.strip_prefix("&") { [INFO] [stdout] 276 ~ .trim() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/dataflow/closure.rs:278:25 [INFO] [stdout] | [INFO] [stdout] 278 | rhs[5..].trim() [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/closure.rs:277:28 [INFO] [stdout] | [INFO] [stdout] 277 | } else if rhs.starts_with("copy ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 277 ~ } else if let Some() = rhs.strip_prefix("copy ") { [INFO] [stdout] 278 ~ .trim() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/dataflow/closure.rs:280:25 [INFO] [stdout] | [INFO] [stdout] 280 | rhs[5..].trim() [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/closure.rs:279:28 [INFO] [stdout] | [INFO] [stdout] 279 | } else if rhs.starts_with("move ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 279 ~ } else if let Some() = rhs.strip_prefix("move ") { [INFO] [stdout] 280 ~ .trim() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/dataflow/closure.rs:485:13 [INFO] [stdout] | [INFO] [stdout] 485 | trimmed[5..].trim().to_string() [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/closure.rs:484:9 [INFO] [stdout] | [INFO] [stdout] 484 | if trimmed.starts_with("move ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 484 ~ if let Some() = trimmed.strip_prefix("move ") { [INFO] [stdout] 485 ~ .trim().to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/dataflow/closure.rs:484:41 [INFO] [stdout] | [INFO] [stdout] 484 | if trimmed.starts_with("move ") { [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 485 | | trimmed[5..].trim().to_string() [INFO] [stdout] 486 | | } else if trimmed.starts_with("&mut ") { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/dataflow/closure.rs:486:48 [INFO] [stdout] | [INFO] [stdout] 486 | } else if trimmed.starts_with("&mut ") { [INFO] [stdout] | ________________________________________________^ [INFO] [stdout] 487 | | trimmed[5..].trim().to_string() [INFO] [stdout] 488 | | } else if trimmed.starts_with('&') { [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: stripping a prefix manually [INFO] [stdout] --> src/dataflow/closure.rs:487:13 [INFO] [stdout] | [INFO] [stdout] 487 | trimmed[5..].trim().to_string() [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/closure.rs:486:16 [INFO] [stdout] | [INFO] [stdout] 486 | } else if trimmed.starts_with("&mut ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 486 ~ } else if let Some() = trimmed.strip_prefix("&mut ") { [INFO] [stdout] 487 ~ .trim().to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/dataflow/closure.rs:489:13 [INFO] [stdout] | [INFO] [stdout] 489 | trimmed[1..].trim().to_string() [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/closure.rs:488:16 [INFO] [stdout] | [INFO] [stdout] 488 | } else if trimmed.starts_with('&') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 488 ~ } else if let Some() = trimmed.strip_prefix('&') { [INFO] [stdout] 489 ~ .trim().to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/dataflow/closure.rs:540:51 [INFO] [stdout] | [INFO] [stdout] 540 | pub fn parse_closure_creation(statement: &str) -> Option<(String, String, Vec<(String, String)>)> { [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: stripping a prefix manually [INFO] [stdout] --> src/dataflow/closure.rs:631:21 [INFO] [stdout] | [INFO] [stdout] 631 | closure_arg[5..].trim().to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/closure.rs:630:35 [INFO] [stdout] | [INFO] [stdout] 630 | let closure_var = if closure_arg.starts_with("move ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 630 ~ let closure_var = if let Some() = closure_arg.strip_prefix("move ") { [INFO] [stdout] 631 ~ .trim().to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `dataflow::field::FieldPath` [INFO] [stdout] --> src/dataflow/field.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 48 | / pub fn to_string(&self) -> String { [INFO] [stdout] 49 | | if self.indices.is_empty() { [INFO] [stdout] 50 | | self.base_var.clone() [INFO] [stdout] 51 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 60 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `dataflow::field::FieldPath` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/dataflow/field.rs:382:26 [INFO] [stdout] | [INFO] [stdout] 382 | clean_base = &clean_base[1..clean_base.len() - 1].trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `clean_base[1..clean_base.len() - 1].trim()` [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: stripping a prefix manually [INFO] [stdout] --> src/dataflow/field.rs:386:13 [INFO] [stdout] | [INFO] [stdout] 386 | clean_base[1..].trim().to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/field.rs:385:24 [INFO] [stdout] | [INFO] [stdout] 385 | let base_var = if clean_base.starts_with('*') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 385 ~ let base_var = if let Some() = clean_base.strip_prefix('*') { [INFO] [stdout] 386 ~ .trim().to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/dataflow/field.rs:582:28 [INFO] [stdout] | [INFO] [stdout] 582 | let rest = &expr[prefix.len()..]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/field.rs:581:13 [INFO] [stdout] | [INFO] [stdout] 581 | if expr.starts_with(prefix) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 581 ~ if let Some(rest) = expr.strip_prefix(prefix) { [INFO] [stdout] 582 ~ return extract_base_var(rest); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/dataflow/path_sensitive.rs:333:5 [INFO] [stdout] | [INFO] [stdout] 333 | / fn process_block_field_sensitive( [INFO] [stdout] 334 | | &self, [INFO] [stdout] 335 | | block: &BasicBlock, [INFO] [stdout] 336 | | field_map: &mut FieldTaintMap, [INFO] [stdout] ... | [INFO] [stdout] 341 | | alias_map: &mut HashMap, [INFO] [stdout] 342 | | ) { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/dataflow/path_sensitive.rs:404:5 [INFO] [stdout] | [INFO] [stdout] 404 | / fn process_statement_field_sensitive( [INFO] [stdout] 405 | | &self, [INFO] [stdout] 406 | | block_id: &str, [INFO] [stdout] 407 | | statement: &str, [INFO] [stdout] ... | [INFO] [stdout] 413 | | alias_map: &mut HashMap, [INFO] [stdout] 414 | | ) { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/dataflow/path_sensitive.rs:420:30 [INFO] [stdout] | [INFO] [stdout] 420 | let source = rhs[11..].trim(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/path_sensitive.rs:419:13 [INFO] [stdout] | [INFO] [stdout] 419 | if rhs.starts_with("deref_copy ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 419 ~ if let Some() = rhs.strip_prefix("deref_copy ") { [INFO] [stdout] 420 ~ let source = .trim(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/dataflow/path_sensitive.rs:544:21 [INFO] [stdout] | [INFO] [stdout] 543 | let t = Self::get_field_taint_state(field_map, &var); [INFO] [stdout] | ----------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 544 | t [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] 543 ~ [INFO] [stdout] 544 ~ Self::get_field_taint_state(field_map, &var) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/dataflow/path_sensitive.rs:804:28 [INFO] [stdout] | [INFO] [stdout] 804 | if heuristic_methods.iter().any(|m| func_name_short == *m) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `heuristic_methods.contains(&func_name_short)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] = note: `#[warn(clippy::manual_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/dataflow/path_sensitive.rs:838:24 [INFO] [stdout] | [INFO] [stdout] 838 | if param_to_param_methods.iter().any(|m| func_name_short == *m) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `param_to_param_methods.contains(&func_name_short)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1000:5 [INFO] [stdout] | [INFO] [stdout] 1000 | / fn process_terminator_field_sensitive( [INFO] [stdout] 1001 | | &self, [INFO] [stdout] 1002 | | _block_id: &str, [INFO] [stdout] 1003 | | _statements: &[String], [INFO] [stdout] ... | [INFO] [stdout] 1010 | | _alias_map: &mut HashMap, [INFO] [stdout] 1011 | | ) { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1061:23 [INFO] [stdout] | [INFO] [stdout] 1061 | let var = expr[5..] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1060:9 [INFO] [stdout] | [INFO] [stdout] 1060 | if expr.starts_with("move ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 1060 ~ if let Some() = expr.strip_prefix("move ") { [INFO] [stdout] 1061 ~ let var = [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1071:23 [INFO] [stdout] | [INFO] [stdout] 1071 | let var = expr[5..] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1070:9 [INFO] [stdout] | [INFO] [stdout] 1070 | if expr.starts_with("copy ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 1070 ~ if let Some() = expr.strip_prefix("copy ") { [INFO] [stdout] 1071 ~ let var = [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1083:23 [INFO] [stdout] | [INFO] [stdout] 1083 | let var = expr[5..] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1082:9 [INFO] [stdout] | [INFO] [stdout] 1082 | if expr.starts_with("&mut ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 1082 ~ if let Some() = expr.strip_prefix("&mut ") { [INFO] [stdout] 1083 ~ let var = [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1093:23 [INFO] [stdout] | [INFO] [stdout] 1093 | let var = expr[1..] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1092:9 [INFO] [stdout] | [INFO] [stdout] 1092 | if expr.starts_with('&') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 1092 ~ if let Some() = expr.strip_prefix('&') { [INFO] [stdout] 1093 ~ let var = [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1155:42 [INFO] [stdout] | [INFO] [stdout] 1155 | if let Ok(idx) = field_expr[4..].parse::() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1152:21 [INFO] [stdout] | [INFO] [stdout] 1152 | if field_expr.starts_with("(_1.") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 1152 ~ if let Some() = field_expr.strip_prefix("(_1.") { [INFO] [stdout] 1153 | // Convert (_1.0 to ((*_1).0) [INFO] [stdout] 1154 | // field_expr is "(_1.0" [INFO] [stdout] 1155 ~ if let Ok(idx) = .parse::() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1320:48 [INFO] [stdout] | [INFO] [stdout] 1320 | if clean_expr.starts_with("&mut ") { [INFO] [stdout] | ________________________________________________^ [INFO] [stdout] 1321 | | clean_expr = &clean_expr[5..].trim(); [INFO] [stdout] 1322 | | } else if clean_expr.starts_with("move ") { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1322:55 [INFO] [stdout] | [INFO] [stdout] 1322 | } else if clean_expr.starts_with("move ") { [INFO] [stdout] | _______________________________________________________^ [INFO] [stdout] 1323 | | clean_expr = &clean_expr[5..].trim(); [INFO] [stdout] 1324 | | } else if clean_expr.starts_with("copy ") { [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] --> src/dataflow/path_sensitive.rs:1322:55 [INFO] [stdout] | [INFO] [stdout] 1322 | } else if clean_expr.starts_with("move ") { [INFO] [stdout] | _______________________________________________________^ [INFO] [stdout] 1323 | | clean_expr = &clean_expr[5..].trim(); [INFO] [stdout] 1324 | | } else if clean_expr.starts_with("copy ") { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1324:55 [INFO] [stdout] | [INFO] [stdout] 1324 | } else if clean_expr.starts_with("copy ") { [INFO] [stdout] | _______________________________________________________^ [INFO] [stdout] 1325 | | clean_expr = &clean_expr[5..].trim(); [INFO] [stdout] 1326 | | } else if clean_expr.starts_with("&") { [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1321:30 [INFO] [stdout] | [INFO] [stdout] 1321 | clean_expr = &clean_expr[5..].trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `clean_expr[5..].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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1323:30 [INFO] [stdout] | [INFO] [stdout] 1323 | clean_expr = &clean_expr[5..].trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `clean_expr[5..].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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1325:30 [INFO] [stdout] | [INFO] [stdout] 1325 | clean_expr = &clean_expr[5..].trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `clean_expr[5..].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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1327:30 [INFO] [stdout] | [INFO] [stdout] 1327 | clean_expr = &clean_expr[1..].trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `clean_expr[1..].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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1329:30 [INFO] [stdout] | [INFO] [stdout] 1329 | clean_expr = &clean_expr[11..].trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `clean_expr[11..].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: this `if` has identical blocks [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1366:48 [INFO] [stdout] | [INFO] [stdout] 1366 | if clean_expr.starts_with("&mut ") { [INFO] [stdout] | ________________________________________________^ [INFO] [stdout] 1367 | | clean_expr = &clean_expr[5..].trim(); [INFO] [stdout] 1368 | | } else if clean_expr.starts_with("move ") { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1368:55 [INFO] [stdout] | [INFO] [stdout] 1368 | } else if clean_expr.starts_with("move ") { [INFO] [stdout] | _______________________________________________________^ [INFO] [stdout] 1369 | | clean_expr = &clean_expr[5..].trim(); [INFO] [stdout] 1370 | | } else if clean_expr.starts_with("copy ") { [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] --> src/dataflow/path_sensitive.rs:1368:55 [INFO] [stdout] | [INFO] [stdout] 1368 | } else if clean_expr.starts_with("move ") { [INFO] [stdout] | _______________________________________________________^ [INFO] [stdout] 1369 | | clean_expr = &clean_expr[5..].trim(); [INFO] [stdout] 1370 | | } else if clean_expr.starts_with("copy ") { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1370:55 [INFO] [stdout] | [INFO] [stdout] 1370 | } else if clean_expr.starts_with("copy ") { [INFO] [stdout] | _______________________________________________________^ [INFO] [stdout] 1371 | | clean_expr = &clean_expr[5..].trim(); [INFO] [stdout] 1372 | | } else if clean_expr.starts_with("&") { [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1367:30 [INFO] [stdout] | [INFO] [stdout] 1367 | clean_expr = &clean_expr[5..].trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `clean_expr[5..].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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1369:30 [INFO] [stdout] | [INFO] [stdout] 1369 | clean_expr = &clean_expr[5..].trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `clean_expr[5..].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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1371:30 [INFO] [stdout] | [INFO] [stdout] 1371 | clean_expr = &clean_expr[5..].trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `clean_expr[5..].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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1373:30 [INFO] [stdout] | [INFO] [stdout] 1373 | clean_expr = &clean_expr[1..].trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `clean_expr[1..].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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/dataflow/path_sensitive.rs:1375:30 [INFO] [stdout] | [INFO] [stdout] 1375 | clean_expr = &clean_expr[11..].trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `clean_expr[11..].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: you seem to want to iterate on a map's values [INFO] [stdout] --> src/dataflow/taint.rs:110:35 [INFO] [stdout] | [INFO] [stdout] 110 | for (_block_id, block) in &self.blocks { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 110 - for (_block_id, block) in &self.blocks { [INFO] [stdout] 110 + for block in self.blocks.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SourceRegistry` [INFO] [stdout] --> src/dataflow/taint.rs:213:5 [INFO] [stdout] | [INFO] [stdout] 213 | / pub fn new() -> Self { [INFO] [stdout] 214 | | Self { [INFO] [stdout] 215 | | patterns: vec![ [INFO] [stdout] 216 | | SourcePattern { [INFO] [stdout] ... | [INFO] [stdout] 231 | | } [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] 212 + impl Default for SourceRegistry { [INFO] [stdout] 213 + fn default() -> Self { [INFO] [stdout] 214 + Self::new() [INFO] [stdout] 215 + } [INFO] [stdout] 216 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SinkRegistry` [INFO] [stdout] --> src/dataflow/taint.rs:271:5 [INFO] [stdout] | [INFO] [stdout] 271 | / pub fn new() -> Self { [INFO] [stdout] 272 | | Self { [INFO] [stdout] 273 | | patterns: vec![ [INFO] [stdout] 274 | | SinkPattern { [INFO] [stdout] ... | [INFO] [stdout] 296 | | } [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] 270 + impl Default for SinkRegistry { [INFO] [stdout] 271 + fn default() -> Self { [INFO] [stdout] 272 + Self::new() [INFO] [stdout] 273 + } [INFO] [stdout] 274 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SanitizerRegistry` [INFO] [stdout] --> src/dataflow/taint.rs:345:5 [INFO] [stdout] | [INFO] [stdout] 345 | / pub fn new() -> Self { [INFO] [stdout] 346 | | Self { [INFO] [stdout] 347 | | patterns: vec![ [INFO] [stdout] 348 | | SanitizerPattern { [INFO] [stdout] ... | [INFO] [stdout] 363 | | } [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] 344 + impl Default for SanitizerRegistry { [INFO] [stdout] 345 + fn default() -> Self { [INFO] [stdout] 346 + Self::new() [INFO] [stdout] 347 + } [INFO] [stdout] 348 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `TaintAnalysis` [INFO] [stdout] --> src/dataflow/taint.rs:403:5 [INFO] [stdout] | [INFO] [stdout] 403 | / pub fn new() -> Self { [INFO] [stdout] 404 | | Self { [INFO] [stdout] 405 | | source_registry: SourceRegistry::new(), [INFO] [stdout] 406 | | sink_registry: SinkRegistry::new(), [INFO] [stdout] ... | [INFO] [stdout] 409 | | } [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] 402 + impl Default for TaintAnalysis { [INFO] [stdout] 403 + fn default() -> Self { [INFO] [stdout] 404 + Self::new() [INFO] [stdout] 405 + } [INFO] [stdout] 406 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/dataflow/taint.rs:520:22 [INFO] [stdout] | [INFO] [stdout] 520 | .or_insert_with(HashSet::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's keys [INFO] [stdout] --> src/interprocedural.rs:484:30 [INFO] [stdout] | [INFO] [stdout] 484 | for (name, _) in nodes { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 484 - for (name, _) in nodes { [INFO] [stdout] 484 + for name in nodes.keys() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/interprocedural.rs:1297:17 [INFO] [stdout] | [INFO] [stdout] 1297 | s.sink_parameters.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.sink_parameters.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: unnecessary use of `get(source_func).is_some()` [INFO] [stdout] --> src/interprocedural.rs:1398:42 [INFO] [stdout] | [INFO] [stdout] 1398 | if self.call_graph.nodes.get(source_func).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains_key(source_func)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] = note: `#[warn(clippy::unnecessary_get_then_check)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/prototypes.rs:342:58 [INFO] [stdout] | [INFO] [stdout] 342 | if let Some(result_var) = line[..eq_pos].trim().split_whitespace().last() { [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/prototypes.rs:534:13 [INFO] [stdout] | [INFO] [stdout] 534 | / lowered.find(pattern).map_or(false, |idx| { [INFO] [stdout] 535 | | idx < first_paren && pattern_outside_quotes(&assignment.rhs, idx) [INFO] [stdout] 536 | | }) [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] 534 - lowered.find(pattern).map_or(false, |idx| { [INFO] [stdout] 534 + lowered.find(pattern).is_some_and(|idx| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/prototypes.rs:642:14 [INFO] [stdout] | [INFO] [stdout] 642 | .or_insert_with(Vec::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/prototypes.rs:658:33 [INFO] [stdout] | [INFO] [stdout] 658 | findings.entry(trimmed).or_insert_with(Vec::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Exploitability` which implements the `Copy` trait [INFO] [stdout] --> src/rules/advanced_async.rs:173:49 [INFO] [stdout] | [INFO] [stdout] 173 | ... exploitability: self.metadata.exploitability.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.metadata.exploitability` [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 `Exploitability` which implements the `Copy` trait [INFO] [stdout] --> src/rules/advanced_async.rs:353:49 [INFO] [stdout] | [INFO] [stdout] 353 | ... exploitability: self.metadata.exploitability.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.metadata.exploitability` [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 `Exploitability` which implements the `Copy` trait [INFO] [stdout] --> src/rules/advanced_async.rs:534:45 [INFO] [stdout] | [INFO] [stdout] 534 | ... exploitability: self.metadata.exploitability.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.metadata.exploitability` [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 `Exploitability` which implements the `Copy` trait [INFO] [stdout] --> src/rules/advanced_input.rs:153:49 [INFO] [stdout] | [INFO] [stdout] 153 | ... exploitability: self.metadata.exploitability.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.metadata.exploitability` [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 `Exploitability` which implements the `Copy` trait [INFO] [stdout] --> src/rules/advanced_input.rs:313:29 [INFO] [stdout] | [INFO] [stdout] 313 | exploitability: self.metadata.exploitability.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.metadata.exploitability` [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 `Exploitability` which implements the `Copy` trait [INFO] [stdout] --> src/rules/advanced_input.rs:458:49 [INFO] [stdout] | [INFO] [stdout] 458 | ... exploitability: self.metadata.exploitability.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.metadata.exploitability` [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 `Exploitability` which implements the `Copy` trait [INFO] [stdout] --> src/rules/advanced_input.rs:616:53 [INFO] [stdout] | [INFO] [stdout] 616 | ... exploitability: self.metadata.exploitability.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.metadata.exploitability` [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 `Exploitability` which implements the `Copy` trait [INFO] [stdout] --> src/rules/advanced_memory.rs:169:37 [INFO] [stdout] | [INFO] [stdout] 169 | exploitability: self.metadata.exploitability.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.metadata.exploitability` [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/rules/advanced_memory.rs:459:29 [INFO] [stdout] | [INFO] [stdout] 459 | if align > 1 && (event.value % align as u128 != 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!event.value.is_multiple_of(align as u128)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `CrateWideAllowRule` [INFO] [stdout] --> src/rules/code_quality.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | / pub fn new() -> Self { [INFO] [stdout] 33 | | Self { [INFO] [stdout] 34 | | metadata: RuleMetadata { [INFO] [stdout] 35 | | id: "RUSTCOLA049".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 50 | | } [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] 31 + impl Default for CrateWideAllowRule { [INFO] [stdout] 32 + fn default() -> Self { [INFO] [stdout] 33 + Self::new() [INFO] [stdout] 34 + } [INFO] [stdout] 35 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `MisorderedAssertEqRule` [INFO] [stdout] --> src/rules/code_quality.rs:132:5 [INFO] [stdout] | [INFO] [stdout] 132 | / pub fn new() -> Self { [INFO] [stdout] 133 | | Self { [INFO] [stdout] 134 | | metadata: RuleMetadata { [INFO] [stdout] 135 | | id: "RUSTCOLA050".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 149 | | } [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] 131 + impl Default for MisorderedAssertEqRule { [INFO] [stdout] 132 + fn default() -> Self { [INFO] [stdout] 133 + Self::new() [INFO] [stdout] 134 + } [INFO] [stdout] 135 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `TryIoResultRule` [INFO] [stdout] --> src/rules/code_quality.rs:223:5 [INFO] [stdout] | [INFO] [stdout] 223 | / pub fn new() -> Self { [INFO] [stdout] 224 | | Self { [INFO] [stdout] 225 | | metadata: RuleMetadata { [INFO] [stdout] 226 | | id: "RUSTCOLA051".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 239 | | } [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] 222 + impl Default for TryIoResultRule { [INFO] [stdout] 223 + fn default() -> Self { [INFO] [stdout] 224 + Self::new() [INFO] [stdout] 225 + } [INFO] [stdout] 226 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `LocalRefCellRule` [INFO] [stdout] --> src/rules/code_quality.rs:317:5 [INFO] [stdout] | [INFO] [stdout] 317 | / pub fn new() -> Self { [INFO] [stdout] 318 | | Self { [INFO] [stdout] 319 | | metadata: RuleMetadata { [INFO] [stdout] 320 | | id: "RUSTCOLA052".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 335 | | } [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] 316 + impl Default for LocalRefCellRule { [INFO] [stdout] 317 + fn default() -> Self { [INFO] [stdout] 318 + Self::new() [INFO] [stdout] 319 + } [INFO] [stdout] 320 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UnnecessaryBorrowMutRule` [INFO] [stdout] --> src/rules/code_quality.rs:415:5 [INFO] [stdout] | [INFO] [stdout] 415 | / pub fn new() -> Self { [INFO] [stdout] 416 | | Self { [INFO] [stdout] 417 | | metadata: RuleMetadata { [INFO] [stdout] 418 | | id: "RUSTCOLA057".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 433 | | } [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] 414 + impl Default for UnnecessaryBorrowMutRule { [INFO] [stdout] 415 + fn default() -> Self { [INFO] [stdout] 416 + Self::new() [INFO] [stdout] 417 + } [INFO] [stdout] 418 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `DeadStoreArrayRule` [INFO] [stdout] --> src/rules/code_quality.rs:529:5 [INFO] [stdout] | [INFO] [stdout] 529 | / pub fn new() -> Self { [INFO] [stdout] 530 | | Self { [INFO] [stdout] 531 | | metadata: RuleMetadata { [INFO] [stdout] 532 | | id: "RUSTCOLA068".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 547 | | } [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] 528 + impl Default for DeadStoreArrayRule { [INFO] [stdout] 529 + fn default() -> Self { [INFO] [stdout] 530 + Self::new() [INFO] [stdout] 531 + } [INFO] [stdout] 532 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `OverscopedAllowRule` [INFO] [stdout] --> src/rules/code_quality.rs:743:5 [INFO] [stdout] | [INFO] [stdout] 743 | / pub fn new() -> Self { [INFO] [stdout] 744 | | Self { [INFO] [stdout] 745 | | metadata: RuleMetadata { [INFO] [stdout] 746 | | id: "RUSTCOLA072".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 758 | | } [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] 742 + impl Default for OverscopedAllowRule { [INFO] [stdout] 743 + fn default() -> Self { [INFO] [stdout] 744 + Self::new() [INFO] [stdout] 745 + } [INFO] [stdout] 746 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `CommentedOutCodeRule` [INFO] [stdout] --> src/rules/code_quality.rs:881:5 [INFO] [stdout] | [INFO] [stdout] 881 | / pub fn new() -> Self { [INFO] [stdout] 882 | | Self { [INFO] [stdout] 883 | | metadata: RuleMetadata { [INFO] [stdout] 884 | | id: "RUSTCOLA092".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 896 | | } [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] 880 + impl Default for CommentedOutCodeRule { [INFO] [stdout] 881 + fn default() -> Self { [INFO] [stdout] 882 + Self::new() [INFO] [stdout] 883 + } [INFO] [stdout] 884 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/code_quality.rs:974:9 [INFO] [stdout] | [INFO] [stdout] 974 | / if content.contains(" = ") && !content.ends_with(':') { [INFO] [stdout] 975 | | if !lowercase.contains("means") [INFO] [stdout] 976 | | && !lowercase.contains("where") [INFO] [stdout] 977 | | && !lowercase.contains("when") [INFO] [stdout] ... | [INFO] [stdout] 982 | | } [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] 974 ~ if content.contains(" = ") && !content.ends_with(':') [INFO] [stdout] 975 ~ && !lowercase.contains("means") [INFO] [stdout] 976 | && !lowercase.contains("where") [INFO] [stdout] ... [INFO] [stdout] 980 | return true; [INFO] [stdout] 981 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/code_quality.rs:988:9 [INFO] [stdout] | [INFO] [stdout] 988 | / if has_semicolon || (has_braces && has_brackets) { [INFO] [stdout] 989 | | if !lowercase.starts_with("this ") [INFO] [stdout] 990 | | && !lowercase.starts_with("the ") [INFO] [stdout] 991 | | && !lowercase.starts_with("a ") [INFO] [stdout] ... | [INFO] [stdout] 996 | | } [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] 988 ~ if (has_semicolon || (has_braces && has_brackets)) { [INFO] [stdout] 989 ~ && !lowercase.starts_with("this ") [INFO] [stdout] 990 | && !lowercase.starts_with("the ") [INFO] [stdout] ... [INFO] [stdout] 994 | return true; [INFO] [stdout] 995 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UnwrapInHotPathRule` [INFO] [stdout] --> src/rules/code_quality.rs:1113:5 [INFO] [stdout] | [INFO] [stdout] 1113 | / pub fn new() -> Self { [INFO] [stdout] 1114 | | Self { [INFO] [stdout] 1115 | | metadata: RuleMetadata { [INFO] [stdout] 1116 | | id: "RUSTCOLA123".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1132 | | } [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] 1112 + impl Default for UnwrapInHotPathRule { [INFO] [stdout] 1113 + fn default() -> Self { [INFO] [stdout] 1114 + Self::new() [INFO] [stdout] 1115 + } [INFO] [stdout] 1116 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/code_quality.rs:1195:27 [INFO] [stdout] | [INFO] [stdout] 1195 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `NonThreadSafeTestRule` [INFO] [stdout] --> src/rules/concurrency.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | / pub fn new() -> Self { [INFO] [stdout] 37 | | Self { [INFO] [stdout] 38 | | metadata: RuleMetadata { [INFO] [stdout] 39 | | id: "RUSTCOLA074".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 56 | | } [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] 35 + impl Default for NonThreadSafeTestRule { [INFO] [stdout] 36 + fn default() -> Self { [INFO] [stdout] 37 + Self::new() [INFO] [stdout] 38 + } [INFO] [stdout] 39 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `BlockingSleepInAsyncRule` [INFO] [stdout] --> src/rules/concurrency.rs:189:5 [INFO] [stdout] | [INFO] [stdout] 189 | / pub fn new() -> Self { [INFO] [stdout] 190 | | Self { [INFO] [stdout] 191 | | metadata: RuleMetadata { [INFO] [stdout] 192 | | id: "RUSTCOLA037".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 206 | | } [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] 188 + impl Default for BlockingSleepInAsyncRule { [INFO] [stdout] 189 + fn default() -> Self { [INFO] [stdout] 190 + Self::new() [INFO] [stdout] 191 + } [INFO] [stdout] 192 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:236:27 [INFO] [stdout] | [INFO] [stdout] 236 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `BlockingOpsInAsyncRule` [INFO] [stdout] --> src/rules/concurrency.rs:331:5 [INFO] [stdout] | [INFO] [stdout] 331 | / pub fn new() -> Self { [INFO] [stdout] 332 | | Self { [INFO] [stdout] 333 | | metadata: RuleMetadata { [INFO] [stdout] 334 | | id: "RUSTCOLA093".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 349 | | } [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] 330 + impl Default for BlockingOpsInAsyncRule { [INFO] [stdout] 331 + fn default() -> Self { [INFO] [stdout] 332 + Self::new() [INFO] [stdout] 333 + } [INFO] [stdout] 334 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:493:27 [INFO] [stdout] | [INFO] [stdout] 493 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/concurrency.rs:532:17 [INFO] [stdout] | [INFO] [stdout] 532 | / if trimmed.contains("async fn ") || trimmed.contains("async move") { [INFO] [stdout] 533 | | if trimmed.contains("async fn ") { [INFO] [stdout] 534 | | in_async_fn = true; [INFO] [stdout] 535 | | async_fn_start = idx; [INFO] [stdout] ... | [INFO] [stdout] 545 | | } [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] 532 ~ if (trimmed.contains("async fn ") || trimmed.contains("async move")) { [INFO] [stdout] 533 ~ && trimmed.contains("async fn ") { [INFO] [stdout] 534 | in_async_fn = true; [INFO] [stdout] ... [INFO] [stdout] 543 | } [INFO] [stdout] 544 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `iter().copied().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable [INFO] [stdout] --> src/rules/concurrency.rs:581:81 [INFO] [stdout] | [INFO] [stdout] 581 | ... let fn_content: String = lines[async_fn_start..=idx] [INFO] [stdout] | ___________________________________________________________________________^ [INFO] [stdout] 582 | | ... .iter() [INFO] [stdout] 583 | | ... .copied() [INFO] [stdout] 584 | | ... .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 `MutexGuardAcrossAwaitRule` [INFO] [stdout] --> src/rules/concurrency.rs:655:5 [INFO] [stdout] | [INFO] [stdout] 655 | / pub fn new() -> Self { [INFO] [stdout] 656 | | Self { [INFO] [stdout] 657 | | metadata: RuleMetadata { [INFO] [stdout] 658 | | id: "RUSTCOLA094".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 672 | | } [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] 654 + impl Default for MutexGuardAcrossAwaitRule { [INFO] [stdout] 655 + fn default() -> Self { [INFO] [stdout] 656 + Self::new() [INFO] [stdout] 657 + } [INFO] [stdout] 658 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:722:27 [INFO] [stdout] | [INFO] [stdout] 722 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/concurrency.rs:759:17 [INFO] [stdout] | [INFO] [stdout] 759 | / if trimmed.contains("async fn ") || trimmed.contains("async move") { [INFO] [stdout] 760 | | if trimmed.contains("async fn ") { [INFO] [stdout] 761 | | in_async_fn = true; [INFO] [stdout] 762 | | async_fn_start = idx; [INFO] [stdout] ... | [INFO] [stdout] 772 | | } [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] 759 ~ if (trimmed.contains("async fn ") || trimmed.contains("async move")) { [INFO] [stdout] 760 ~ && trimmed.contains("async fn ") { [INFO] [stdout] 761 | in_async_fn = true; [INFO] [stdout] ... [INFO] [stdout] 770 | } [INFO] [stdout] 771 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `iter().copied().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable [INFO] [stdout] --> src/rules/concurrency.rs:791:92 [INFO] [stdout] | [INFO] [stdout] 791 | ... [async_fn_start..=std::cmp::min(idx + 50, lines.len() - 1)] [INFO] [stdout] | __________________________________________________________________________________^ [INFO] [stdout] 792 | | ... .iter() [INFO] [stdout] 793 | | ... .copied() [INFO] [stdout] 794 | | ... .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] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UnderscoreLockGuardRule` [INFO] [stdout] --> src/rules/concurrency.rs:876:5 [INFO] [stdout] | [INFO] [stdout] 876 | / pub fn new() -> Self { [INFO] [stdout] 877 | | Self { [INFO] [stdout] 878 | | metadata: RuleMetadata { [INFO] [stdout] 879 | | id: "RUSTCOLA030".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 891 | | } [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] 875 + impl Default for UnderscoreLockGuardRule { [INFO] [stdout] 876 + fn default() -> Self { [INFO] [stdout] 877 + Self::new() [INFO] [stdout] 878 + } [INFO] [stdout] 879 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/rules/concurrency.rs:938:32 [INFO] [stdout] | [INFO] [stdout] 938 | ... && var_part [INFO] [stdout] | __________________________^ [INFO] [stdout] 939 | | ... .chars() [INFO] [stdout] 940 | | ... .nth(1) [INFO] [stdout] 941 | | ... .map_or(false, |c| c.is_ascii_digit()) [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] 941 - .map_or(false, |c| c.is_ascii_digit()) [INFO] [stdout] 941 + .is_some_and(|c| c.is_ascii_digit()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/rules/concurrency.rs:974:25 [INFO] [stdout] | [INFO] [stdout] 974 | || !lock_result_var [INFO] [stdout] | _________________________^ [INFO] [stdout] 975 | | .chars() [INFO] [stdout] 976 | | .nth(1) [INFO] [stdout] 977 | | .map_or(false, |c| c.is_ascii_digit()) [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] 977 - .map_or(false, |c| c.is_ascii_digit()) [INFO] [stdout] 977 + .is_some_and(|c| c.is_ascii_digit()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/rules/concurrency.rs:1034:32 [INFO] [stdout] | [INFO] [stdout] 1034 | ... && guard_var [INFO] [stdout] | __________________________^ [INFO] [stdout] 1035 | | ... .chars() [INFO] [stdout] 1036 | | ... .nth(1) [INFO] [stdout] 1037 | | ... .map_or(false, |c| c.is_ascii_digit()) [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] 1037 - .map_or(false, |c| c.is_ascii_digit()) [INFO] [stdout] 1037 + .is_some_and(|c| c.is_ascii_digit()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `BroadcastUnsyncPayloadRule` [INFO] [stdout] --> src/rules/concurrency.rs:1088:5 [INFO] [stdout] | [INFO] [stdout] 1088 | / pub fn new() -> Self { [INFO] [stdout] 1089 | | Self { [INFO] [stdout] 1090 | | metadata: RuleMetadata { [INFO] [stdout] 1091 | | id: "RUSTCOLA023".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1103 | | } [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] 1087 + impl Default for BroadcastUnsyncPayloadRule { [INFO] [stdout] 1088 + fn default() -> Self { [INFO] [stdout] 1089 + Self::new() [INFO] [stdout] 1090 + } [INFO] [stdout] 1091 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PanicInDropRule` [INFO] [stdout] --> src/rules/concurrency.rs:1159:5 [INFO] [stdout] | [INFO] [stdout] 1159 | / pub fn new() -> Self { [INFO] [stdout] 1160 | | Self { [INFO] [stdout] 1161 | | metadata: RuleMetadata { [INFO] [stdout] 1162 | | id: "RUSTCOLA040".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1174 | | } [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] 1158 + impl Default for PanicInDropRule { [INFO] [stdout] 1159 + fn default() -> Self { [INFO] [stdout] 1160 + Self::new() [INFO] [stdout] 1161 + } [INFO] [stdout] 1162 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:1211:27 [INFO] [stdout] | [INFO] [stdout] 1211 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `UnwrapInPollRule` [INFO] [stdout] --> src/rules/concurrency.rs:1319:5 [INFO] [stdout] | [INFO] [stdout] 1319 | / pub fn new() -> Self { [INFO] [stdout] 1320 | | Self { [INFO] [stdout] 1321 | | metadata: RuleMetadata { [INFO] [stdout] 1322 | | id: "RUSTCOLA041".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1334 | | } [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] 1318 + impl Default for UnwrapInPollRule { [INFO] [stdout] 1319 + fn default() -> Self { [INFO] [stdout] 1320 + Self::new() [INFO] [stdout] 1321 + } [INFO] [stdout] 1322 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:1371:27 [INFO] [stdout] | [INFO] [stdout] 1371 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `UnsafeSendSyncBoundsRule` [INFO] [stdout] --> src/rules/concurrency.rs:1504:5 [INFO] [stdout] | [INFO] [stdout] 1504 | / pub fn new() -> Self { [INFO] [stdout] 1505 | | Self { [INFO] [stdout] 1506 | | metadata: RuleMetadata { [INFO] [stdout] 1507 | | id: "RUSTCOLA015".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1519 | | } [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] 1503 + impl Default for UnsafeSendSyncBoundsRule { [INFO] [stdout] 1504 + fn default() -> Self { [INFO] [stdout] 1505 + Self::new() [INFO] [stdout] 1506 + } [INFO] [stdout] 1507 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/rules/concurrency.rs:1590:17 [INFO] [stdout] | [INFO] [stdout] 1590 | / let Some(name) = Self::normalize_generic_name(param) else { [INFO] [stdout] 1591 | | return None; [INFO] [stdout] 1592 | | }; [INFO] [stdout] | |__________________^ help: replace it with: `let name = Self::normalize_generic_name(param)?;` [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: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:1599:26 [INFO] [stdout] | [INFO] [stdout] 1599 | .map(|rest| Self::split_bounds(rest)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Self::split_bounds` [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: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:1661:22 [INFO] [stdout] | [INFO] [stdout] 1661 | .map(|rest| Self::split_bounds(rest)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Self::split_bounds` [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: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/rules/concurrency.rs:1676:39 [INFO] [stdout] | [INFO] [stdout] 1676 | .trim_end_matches(|c| matches!(c, ',' | '{' | ';')) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `[',', '{', ';']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] = note: `#[warn(clippy::manual_pattern_char_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:1781:27 [INFO] [stdout] | [INFO] [stdout] 1781 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `NonCancellationSafeSelectRule` [INFO] [stdout] --> src/rules/concurrency.rs:1911:5 [INFO] [stdout] | [INFO] [stdout] 1911 | / pub fn new() -> Self { [INFO] [stdout] 1912 | | Self { [INFO] [stdout] 1913 | | metadata: RuleMetadata { [INFO] [stdout] 1914 | | id: "RUSTCOLA115".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1933 | | } [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] 1910 + impl Default for NonCancellationSafeSelectRule { [INFO] [stdout] 1911 + fn default() -> Self { [INFO] [stdout] 1912 + Self::new() [INFO] [stdout] 1913 + } [INFO] [stdout] 1914 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:2007:27 [INFO] [stdout] | [INFO] [stdout] 2007 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `MissingSyncBoundOnCloneRule` [INFO] [stdout] --> src/rules/concurrency.rs:2112:5 [INFO] [stdout] | [INFO] [stdout] 2112 | / pub fn new() -> Self { [INFO] [stdout] 2113 | | Self { [INFO] [stdout] 2114 | | metadata: RuleMetadata { [INFO] [stdout] 2115 | | id: "RUSTCOLA111".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 2131 | | } [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] 2111 + impl Default for MissingSyncBoundOnCloneRule { [INFO] [stdout] 2112 + fn default() -> Self { [INFO] [stdout] 2113 + Self::new() [INFO] [stdout] 2114 + } [INFO] [stdout] 2115 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:2157:27 [INFO] [stdout] | [INFO] [stdout] 2157 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `PinContractViolationRule` [INFO] [stdout] --> src/rules/concurrency.rs:2287:5 [INFO] [stdout] | [INFO] [stdout] 2287 | / pub fn new() -> Self { [INFO] [stdout] 2288 | | Self { [INFO] [stdout] 2289 | | metadata: RuleMetadata { [INFO] [stdout] 2290 | | id: "RUSTCOLA112".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 2306 | | } [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] 2286 + impl Default for PinContractViolationRule { [INFO] [stdout] 2287 + fn default() -> Self { [INFO] [stdout] 2288 + Self::new() [INFO] [stdout] 2289 + } [INFO] [stdout] 2290 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:2332:27 [INFO] [stdout] | [INFO] [stdout] 2332 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `OneshotRaceAfterCloseRule` [INFO] [stdout] --> src/rules/concurrency.rs:2425:5 [INFO] [stdout] | [INFO] [stdout] 2425 | / pub fn new() -> Self { [INFO] [stdout] 2426 | | Self { [INFO] [stdout] 2427 | | metadata: RuleMetadata { [INFO] [stdout] 2428 | | id: "RUSTCOLA113".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 2446 | | } [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] 2424 + impl Default for OneshotRaceAfterCloseRule { [INFO] [stdout] 2425 + fn default() -> Self { [INFO] [stdout] 2426 + Self::new() [INFO] [stdout] 2427 + } [INFO] [stdout] 2428 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:2472:27 [INFO] [stdout] | [INFO] [stdout] 2472 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/concurrency.rs:2530:21 [INFO] [stdout] | [INFO] [stdout] 2530 | / if in_spawn_context { [INFO] [stdout] 2531 | | if trimmed.contains(".send(") || trimmed.contains(".try_recv(") { [INFO] [stdout] 2532 | | let location = format!("{}:{}", rel_path, idx + 1); [INFO] [stdout] ... | [INFO] [stdout] 2551 | | } [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] 2530 ~ if in_spawn_context [INFO] [stdout] 2531 ~ && (trimmed.contains(".send(") || trimmed.contains(".try_recv(")) { [INFO] [stdout] 2532 | let location = format!("{}:{}", rel_path, idx + 1); [INFO] [stdout] ... [INFO] [stdout] 2549 | }); [INFO] [stdout] 2550 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `AsyncSignalUnsafeInHandlerRule` [INFO] [stdout] --> src/rules/concurrency.rs:2574:5 [INFO] [stdout] | [INFO] [stdout] 2574 | / pub fn new() -> Self { [INFO] [stdout] 2575 | | Self { [INFO] [stdout] 2576 | | metadata: RuleMetadata { [INFO] [stdout] 2577 | | id: "RUSTCOLA109".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 2596 | | } [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] 2573 + impl Default for AsyncSignalUnsafeInHandlerRule { [INFO] [stdout] 2574 + fn default() -> Self { [INFO] [stdout] 2575 + Self::new() [INFO] [stdout] 2576 + } [INFO] [stdout] 2577 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:2645:27 [INFO] [stdout] | [INFO] [stdout] 2645 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `OnceCellTocTouRule` [INFO] [stdout] --> src/rules/concurrency.rs:2763:5 [INFO] [stdout] | [INFO] [stdout] 2763 | / pub fn new() -> Self { [INFO] [stdout] 2764 | | Self { [INFO] [stdout] 2765 | | metadata: RuleMetadata { [INFO] [stdout] 2766 | | id: "RUSTCOLA100".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 2784 | | } [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] 2762 + impl Default for OnceCellTocTouRule { [INFO] [stdout] 2763 + fn default() -> Self { [INFO] [stdout] 2764 + Self::new() [INFO] [stdout] 2765 + } [INFO] [stdout] 2766 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:2824:27 [INFO] [stdout] | [INFO] [stdout] 2824 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `PanicWhileHoldingLockRule` [INFO] [stdout] --> src/rules/concurrency.rs:2920:5 [INFO] [stdout] | [INFO] [stdout] 2920 | / pub fn new() -> Self { [INFO] [stdout] 2921 | | Self { [INFO] [stdout] 2922 | | metadata: RuleMetadata { [INFO] [stdout] 2923 | | id: "RUSTCOLA117".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 2941 | | } [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] 2919 + impl Default for PanicWhileHoldingLockRule { [INFO] [stdout] 2920 + fn default() -> Self { [INFO] [stdout] 2921 + Self::new() [INFO] [stdout] 2922 + } [INFO] [stdout] 2923 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:2994:27 [INFO] [stdout] | [INFO] [stdout] 2994 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `ClosureEscapingRefsRule` [INFO] [stdout] --> src/rules/concurrency.rs:3102:5 [INFO] [stdout] | [INFO] [stdout] 3102 | / pub fn new() -> Self { [INFO] [stdout] 3103 | | Self { [INFO] [stdout] 3104 | | metadata: RuleMetadata { [INFO] [stdout] 3105 | | id: "RUSTCOLA119".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 3120 | | } [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] 3101 + impl Default for ClosureEscapingRefsRule { [INFO] [stdout] 3102 + fn default() -> Self { [INFO] [stdout] 3103 + Self::new() [INFO] [stdout] 3104 + } [INFO] [stdout] 3105 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:3171:27 [INFO] [stdout] | [INFO] [stdout] 3171 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `ExecutorStarvationRule` [INFO] [stdout] --> src/rules/concurrency.rs:3296:5 [INFO] [stdout] | [INFO] [stdout] 3296 | / pub fn new() -> Self { [INFO] [stdout] 3297 | | Self { [INFO] [stdout] 3298 | | metadata: RuleMetadata { [INFO] [stdout] 3299 | | id: "RUSTCOLA121".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 3315 | | } [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] 3295 + impl Default for ExecutorStarvationRule { [INFO] [stdout] 3296 + fn default() -> Self { [INFO] [stdout] 3297 + Self::new() [INFO] [stdout] 3298 + } [INFO] [stdout] 3299 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:3358:27 [INFO] [stdout] | [INFO] [stdout] 3358 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/rules/concurrency.rs:3413:36 [INFO] [stdout] | [INFO] [stdout] 3413 | ... .split(|c| c == '(' || c == '<') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['(', '<']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `AsyncDropCorrectnessRule` [INFO] [stdout] --> src/rules/concurrency.rs:3489:5 [INFO] [stdout] | [INFO] [stdout] 3489 | / pub fn new() -> Self { [INFO] [stdout] 3490 | | Self { [INFO] [stdout] 3491 | | metadata: RuleMetadata { [INFO] [stdout] 3492 | | id: "RUSTCOLA122".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 3508 | | } [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] 3488 + impl Default for AsyncDropCorrectnessRule { [INFO] [stdout] 3489 + fn default() -> Self { [INFO] [stdout] 3490 + Self::new() [INFO] [stdout] 3491 + } [INFO] [stdout] 3492 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:3572:27 [INFO] [stdout] | [INFO] [stdout] 3572 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/rules/concurrency.rs:3618:36 [INFO] [stdout] | [INFO] [stdout] 3618 | ... .split(|c| c == '(' || c == '<') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['(', '<']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PanicInDropImplRule` [INFO] [stdout] --> src/rules/concurrency.rs:3705:5 [INFO] [stdout] | [INFO] [stdout] 3705 | / pub fn new() -> Self { [INFO] [stdout] 3706 | | Self { [INFO] [stdout] 3707 | | metadata: RuleMetadata { [INFO] [stdout] 3708 | | id: "RUSTCOLA124".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 3724 | | } [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] 3704 + impl Default for PanicInDropImplRule { [INFO] [stdout] 3705 + fn default() -> Self { [INFO] [stdout] 3706 + Self::new() [INFO] [stdout] 3707 + } [INFO] [stdout] 3708 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:3778:27 [INFO] [stdout] | [INFO] [stdout] 3778 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `SpawnedTaskPanicRule` [INFO] [stdout] --> src/rules/concurrency.rs:3912:5 [INFO] [stdout] | [INFO] [stdout] 3912 | / pub fn new() -> Self { [INFO] [stdout] 3913 | | Self { [INFO] [stdout] 3914 | | metadata: RuleMetadata { [INFO] [stdout] 3915 | | id: "RUSTCOLA125".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 3931 | | } [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] 3911 + impl Default for SpawnedTaskPanicRule { [INFO] [stdout] 3912 + fn default() -> Self { [INFO] [stdout] 3913 + Self::new() [INFO] [stdout] 3914 + } [INFO] [stdout] 3915 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/concurrency.rs:3988:27 [INFO] [stdout] | [INFO] [stdout] 3988 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you are using an explicit closure for copying elements [INFO] [stdout] --> src/rules/concurrency.rs:4032:51 [INFO] [stdout] | [INFO] [stdout] 4032 | ... let context: String = lines[check_range] [INFO] [stdout] | _____________________________________________^ [INFO] [stdout] 4033 | | ... .iter() [INFO] [stdout] 4034 | | ... .map(|s| *s) [INFO] [stdout] | |______________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 4032 ~ let context: String = lines[check_range] [INFO] [stdout] 4033 + .iter().copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/rules/concurrency.rs:4050:142 [INFO] [stdout] | [INFO] [stdout] 4050 | ... findings.push(Finding::new(self.metadata.id.clone(), self.metadata.name.clone(), self.metadata.default_severity, format!( [INFO] [stdout] | ________________________________________________________________________________________________________________________^ [INFO] [stdout] 4051 | | ... "Spawned task without panic handling. Panics will be silently swallowed. \ [INFO] [stdout] 4052 | | ... Consider using .await on the JoinHandle or adding a panic hook." [INFO] [stdout] 4053 | | ... ), location, String::new(), vec![trimmed.to_string()], None)); [INFO] [stdout] | |___________^ [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] help: consider using `.to_string()` [INFO] [stdout] | [INFO] [stdout] 4050 ~ findings.push(Finding::new(self.metadata.id.clone(), self.metadata.name.clone(), self.metadata.default_severity, "Spawned task without panic handling. Panics will be silently swallowed. \ [INFO] [stdout] 4051 ~ Consider using .await on the JoinHandle or adding a panic hook.".to_string(), location, String::new(), vec![trimmed.to_string()], None)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/crypto.rs:69:5 [INFO] [stdout] | [INFO] [stdout] 69 | / if lower.contains("ripemd") { [INFO] [stdout] 70 | | if lower.contains("ripemd::") [INFO] [stdout] 71 | | || lower.contains("::ripemd") [INFO] [stdout] 72 | | || lower.contains("ripemd128") [INFO] [stdout] ... | [INFO] [stdout] 79 | | } [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 lower.contains("ripemd") [INFO] [stdout] 70 ~ && (lower.contains("ripemd::") [INFO] [stdout] 71 | || lower.contains("::ripemd") [INFO] [stdout] ... [INFO] [stdout] 74 | || lower.contains("ripemd256") [INFO] [stdout] 75 ~ || lower.contains("ripemd320")) [INFO] [stdout] 76 | { [INFO] [stdout] 77 | return true; [INFO] [stdout] 78 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/crypto.rs:82:5 [INFO] [stdout] | [INFO] [stdout] 82 | / if lower.contains("crc") { [INFO] [stdout] 83 | | if lower.contains("crc::") [INFO] [stdout] 84 | | || lower.contains("::crc") [INFO] [stdout] 85 | | || lower.contains("crc32") [INFO] [stdout] ... | [INFO] [stdout] 94 | | } [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] 82 ~ if lower.contains("crc") [INFO] [stdout] 83 ~ && (lower.contains("crc::") [INFO] [stdout] 84 | || lower.contains("::crc") [INFO] [stdout] ... [INFO] [stdout] 89 | || lower.contains("crc64") [INFO] [stdout] 90 ~ || lower.contains("crc_64")) [INFO] [stdout] 91 | { [INFO] [stdout] 92 | return true; [INFO] [stdout] 93 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `InsecureMd5Rule` [INFO] [stdout] --> src/rules/crypto.rs:120:5 [INFO] [stdout] | [INFO] [stdout] 120 | / pub fn new() -> Self { [INFO] [stdout] 121 | | Self { [INFO] [stdout] 122 | | metadata: RuleMetadata { [INFO] [stdout] 123 | | id: "RUSTCOLA004".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 135 | | } [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] 119 + impl Default for InsecureMd5Rule { [INFO] [stdout] 120 + fn default() -> Self { [INFO] [stdout] 121 + Self::new() [INFO] [stdout] 122 + } [INFO] [stdout] 123 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `InsecureSha1Rule` [INFO] [stdout] --> src/rules/crypto.rs:193:5 [INFO] [stdout] | [INFO] [stdout] 193 | / pub fn new() -> Self { [INFO] [stdout] 194 | | Self { [INFO] [stdout] 195 | | metadata: RuleMetadata { [INFO] [stdout] 196 | | id: "RUSTCOLA005".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 208 | | } [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] 192 + impl Default for InsecureSha1Rule { [INFO] [stdout] 193 + fn default() -> Self { [INFO] [stdout] 194 + Self::new() [INFO] [stdout] 195 + } [INFO] [stdout] 196 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `WeakHashingExtendedRule` [INFO] [stdout] --> src/rules/crypto.rs:270:5 [INFO] [stdout] | [INFO] [stdout] 270 | / pub fn new() -> Self { [INFO] [stdout] 271 | | Self { [INFO] [stdout] 272 | | metadata: RuleMetadata { [INFO] [stdout] 273 | | id: "RUSTCOLA062".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 285 | | } [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] 269 + impl Default for WeakHashingExtendedRule { [INFO] [stdout] 270 + fn default() -> Self { [INFO] [stdout] 271 + Self::new() [INFO] [stdout] 272 + } [INFO] [stdout] 273 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `HardcodedCryptoKeyRule` [INFO] [stdout] --> src/rules/crypto.rs:357:5 [INFO] [stdout] | [INFO] [stdout] 357 | / pub fn new() -> Self { [INFO] [stdout] 358 | | Self { [INFO] [stdout] 359 | | metadata: RuleMetadata { [INFO] [stdout] 360 | | id: "RUSTCOLA039".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 372 | | } [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] 356 + impl Default for HardcodedCryptoKeyRule { [INFO] [stdout] 357 + fn default() -> Self { [INFO] [stdout] 358 + Self::new() [INFO] [stdout] 359 + } [INFO] [stdout] 360 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/crypto.rs:507:27 [INFO] [stdout] | [INFO] [stdout] 507 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/crypto.rs:544:21 [INFO] [stdout] | [INFO] [stdout] 544 | / if trimmed.contains(pattern) { [INFO] [stdout] 545 | | if trimmed.contains("b\"") [INFO] [stdout] 546 | | || trimmed.contains("&[") [INFO] [stdout] 547 | | || trimmed.contains("[0x") [INFO] [stdout] ... | [INFO] [stdout] 562 | | } [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] 544 ~ if trimmed.contains(pattern) [INFO] [stdout] 545 ~ && (trimmed.contains("b\"") [INFO] [stdout] 546 | || trimmed.contains("&[") [INFO] [stdout] 547 ~ || trimmed.contains("[0x")) [INFO] [stdout] 548 | { [INFO] [stdout] ... [INFO] [stdout] 560 | )); [INFO] [stdout] 561 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `TimingAttackRule` [INFO] [stdout] --> src/rules/crypto.rs:600:5 [INFO] [stdout] | [INFO] [stdout] 600 | / pub fn new() -> Self { [INFO] [stdout] 601 | | Self { [INFO] [stdout] 602 | | metadata: RuleMetadata { [INFO] [stdout] 603 | | id: "RUSTCOLA044".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 615 | | } [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] 599 + impl Default for TimingAttackRule { [INFO] [stdout] 600 + fn default() -> Self { [INFO] [stdout] 601 + Self::new() [INFO] [stdout] 602 + } [INFO] [stdout] 603 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/crypto.rs:688:27 [INFO] [stdout] | [INFO] [stdout] 688 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `WeakCipherRule` [INFO] [stdout] --> src/rules/crypto.rs:750:5 [INFO] [stdout] | [INFO] [stdout] 750 | / pub fn new() -> Self { [INFO] [stdout] 751 | | Self { [INFO] [stdout] 752 | | metadata: RuleMetadata { [INFO] [stdout] 753 | | id: "RUSTCOLA045".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 765 | | } [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] 749 + impl Default for WeakCipherRule { [INFO] [stdout] 750 + fn default() -> Self { [INFO] [stdout] 751 + Self::new() [INFO] [stdout] 752 + } [INFO] [stdout] 753 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PredictableRandomnessRule` [INFO] [stdout] --> src/rules/crypto.rs:881:5 [INFO] [stdout] | [INFO] [stdout] 881 | / pub fn new() -> Self { [INFO] [stdout] 882 | | Self { [INFO] [stdout] 883 | | metadata: RuleMetadata { [INFO] [stdout] 884 | | id: "RUSTCOLA046".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 896 | | } [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] 880 + impl Default for PredictableRandomnessRule { [INFO] [stdout] 881 + fn default() -> Self { [INFO] [stdout] 882 + Self::new() [INFO] [stdout] 883 + } [INFO] [stdout] 884 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/crypto.rs:908:9 [INFO] [stdout] | [INFO] [stdout] 908 | / if lowered.contains("seed_from_u64") { [INFO] [stdout] 909 | | if lowered.contains("const") && (lowered.contains("_u64") || lowered.contains("_i64")) { [INFO] [stdout] 910 | | return true; [INFO] [stdout] 911 | | } [INFO] [stdout] 912 | | } [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] 908 ~ if lowered.contains("seed_from_u64") [INFO] [stdout] 909 ~ && lowered.contains("const") && (lowered.contains("_u64") || lowered.contains("_i64")) { [INFO] [stdout] 910 | return true; [INFO] [stdout] 911 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/crypto.rs:914:9 [INFO] [stdout] | [INFO] [stdout] 914 | / if lowered.contains("from_seed") { [INFO] [stdout] 915 | | if lowered.contains("const") && lowered.contains("[") { [INFO] [stdout] 916 | | return true; [INFO] [stdout] 917 | | } [INFO] [stdout] 918 | | } [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] 914 ~ if lowered.contains("from_seed") [INFO] [stdout] 915 ~ && lowered.contains("const") && lowered.contains("[") { [INFO] [stdout] 916 | return true; [INFO] [stdout] 917 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ModuloBiasRandomRule` [INFO] [stdout] --> src/rules/crypto.rs:996:5 [INFO] [stdout] | [INFO] [stdout] 996 | / pub fn new() -> Self { [INFO] [stdout] 997 | | Self { [INFO] [stdout] 998 | | metadata: RuleMetadata { [INFO] [stdout] 999 | | id: "RUSTCOLA011".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1011 | | } [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] 995 + impl Default for ModuloBiasRandomRule { [INFO] [stdout] 996 + fn default() -> Self { [INFO] [stdout] 997 + Self::new() [INFO] [stdout] 998 + } [INFO] [stdout] 999 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `AllocatorMismatchFfiRule` [INFO] [stdout] --> src/rules/ffi.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | / pub fn new() -> Self { [INFO] [stdout] 32 | | Self { [INFO] [stdout] 33 | | metadata: RuleMetadata { [INFO] [stdout] 34 | | id: "RUSTCOLA017".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 52 | | } [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] 30 + impl Default for AllocatorMismatchFfiRule { [INFO] [stdout] 31 + fn default() -> Self { [INFO] [stdout] 32 + Self::new() [INFO] [stdout] 33 + } [INFO] [stdout] 34 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UnsafeFfiPointerReturnRule` [INFO] [stdout] --> src/rules/ffi.rs:257:5 [INFO] [stdout] | [INFO] [stdout] 257 | / pub fn new() -> Self { [INFO] [stdout] 258 | | Self { [INFO] [stdout] 259 | | metadata: RuleMetadata { [INFO] [stdout] 260 | | id: "RUSTCOLA073".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 276 | | } [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] 256 + impl Default for UnsafeFfiPointerReturnRule { [INFO] [stdout] 257 + fn default() -> Self { [INFO] [stdout] 258 + Self::new() [INFO] [stdout] 259 + } [INFO] [stdout] 260 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PackedFieldReferenceRule` [INFO] [stdout] --> src/rules/ffi.rs:364:5 [INFO] [stdout] | [INFO] [stdout] 364 | / pub fn new() -> Self { [INFO] [stdout] 365 | | Self { [INFO] [stdout] 366 | | metadata: RuleMetadata { [INFO] [stdout] 367 | | id: "RUSTCOLA035".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 381 | | } [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] 363 + impl Default for PackedFieldReferenceRule { [INFO] [stdout] 364 + fn default() -> Self { [INFO] [stdout] 365 + Self::new() [INFO] [stdout] 366 + } [INFO] [stdout] 367 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/ffi.rs:410:27 [INFO] [stdout] | [INFO] [stdout] 410 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: the loop variable `j` is only used to index `lines` [INFO] [stdout] --> src/rules/ffi.rs:437:30 [INFO] [stdout] | [INFO] [stdout] 437 | for j in (idx + 1).min(lines.len())..lines.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 437 - for j in (idx + 1).min(lines.len())..lines.len() { [INFO] [stdout] 437 + for in lines.iter().skip((idx + 1).min(lines.len())) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/rules/ffi.rs:443:33 [INFO] [stdout] | [INFO] [stdout] 443 | ... &struct_line[11..] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/rules/ffi.rs:442:48 [INFO] [stdout] | [INFO] [stdout] 442 | ... let after_struct = if struct_line.starts_with("pub struct ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 442 ~ let after_struct = if let Some() = struct_line.strip_prefix("pub struct ") { [INFO] [stdout] 443 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/ffi.rs:464:27 [INFO] [stdout] | [INFO] [stdout] 464 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `UnsafeCStringPointerRule` [INFO] [stdout] --> src/rules/ffi.rs:540:5 [INFO] [stdout] | [INFO] [stdout] 540 | / pub fn new() -> Self { [INFO] [stdout] 541 | | Self { [INFO] [stdout] 542 | | metadata: RuleMetadata { [INFO] [stdout] 543 | | id: "RUSTCOLA036".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 558 | | } [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] 539 + impl Default for UnsafeCStringPointerRule { [INFO] [stdout] 540 + fn default() -> Self { [INFO] [stdout] 541 + Self::new() [INFO] [stdout] 542 + } [INFO] [stdout] 543 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/ffi.rs:600:27 [INFO] [stdout] | [INFO] [stdout] 600 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `CtorDtorStdApiRule` [INFO] [stdout] --> src/rules/ffi.rs:663:5 [INFO] [stdout] | [INFO] [stdout] 663 | / pub fn new() -> Self { [INFO] [stdout] 664 | | Self { [INFO] [stdout] 665 | | metadata: RuleMetadata { [INFO] [stdout] 666 | | id: "RUSTCOLA059".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 678 | | } [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] 662 + impl Default for CtorDtorStdApiRule { [INFO] [stdout] 663 + fn default() -> Self { [INFO] [stdout] 664 + Self::new() [INFO] [stdout] 665 + } [INFO] [stdout] 666 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `FfiBufferLeakRule` [INFO] [stdout] --> src/rules/ffi.rs:764:5 [INFO] [stdout] | [INFO] [stdout] 764 | / pub fn new() -> Self { [INFO] [stdout] 765 | | Self { [INFO] [stdout] 766 | | metadata: RuleMetadata { [INFO] [stdout] 767 | | id: "RUSTCOLA016".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 779 | | } [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] 763 + impl Default for FfiBufferLeakRule { [INFO] [stdout] 764 + fn default() -> Self { [INFO] [stdout] 765 + Self::new() [INFO] [stdout] 766 + } [INFO] [stdout] 767 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `pending_no_mangle` after checking its variant with `is_some` [INFO] [stdout] --> src/rules/ffi.rs:903:33 [INFO] [stdout] | [INFO] [stdout] 901 | } else if pending_no_mangle.is_some() && trimmed.contains("fn ") { [INFO] [stdout] | --------------------------- the check is happening here [INFO] [stdout] 902 | is_ffi_fn = true; [INFO] [stdout] 903 | start_idx = pending_no_mangle.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `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: redundant closure [INFO] [stdout] --> src/rules/ffi.rs:840:27 [INFO] [stdout] | [INFO] [stdout] 840 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: the loop variable `attr_idx` is only used to index `lines` [INFO] [stdout] --> src/rules/ffi.rs:919:37 [INFO] [stdout] | [INFO] [stdout] 919 | for attr_idx in start_idx..idx { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 919 - for attr_idx in start_idx..idx { [INFO] [stdout] 919 + for in lines.iter().take(idx).skip(start_idx) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/rules/ffi.rs:949:75 [INFO] [stdout] | [INFO] [stdout] 949 | let body_done = if body_started && brace_balance <= 0 { [INFO] [stdout] | ___________________________________________________________________________^ [INFO] [stdout] 950 | | true [INFO] [stdout] 951 | | } else if !body_started && trimmed_sanitized.ends_with(';') { [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/rules/ffi.rs:951:81 [INFO] [stdout] | [INFO] [stdout] 951 | } else if !body_started && trimmed_sanitized.ends_with(';') { [INFO] [stdout] | _________________________________________________________________________________^ [INFO] [stdout] 952 | | true [INFO] [stdout] 953 | | } else { [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-then-else expression returns a bool literal [INFO] [stdout] --> src/rules/ffi.rs:951:28 [INFO] [stdout] | [INFO] [stdout] 951 | } else if !body_started && trimmed_sanitized.ends_with(';') { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 952 | | true [INFO] [stdout] 953 | | } else { [INFO] [stdout] 954 | | false [INFO] [stdout] 955 | | }; [INFO] [stdout] | |_____________________^ help: you can reduce it to: `{ !body_started && trimmed_sanitized.ends_with(';') }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PanicInFfiBoundaryRule` [INFO] [stdout] --> src/rules/ffi.rs:1068:5 [INFO] [stdout] | [INFO] [stdout] 1068 | / pub fn new() -> Self { [INFO] [stdout] 1069 | | Self { [INFO] [stdout] 1070 | | metadata: RuleMetadata { [INFO] [stdout] 1071 | | id: "RUSTCOLA116".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1089 | | } [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] 1067 + impl Default for PanicInFfiBoundaryRule { [INFO] [stdout] 1068 + fn default() -> Self { [INFO] [stdout] 1069 + Self::new() [INFO] [stdout] 1070 + } [INFO] [stdout] 1071 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/ffi.rs:1132:27 [INFO] [stdout] | [INFO] [stdout] 1132 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `EmbeddedInterpreterUsageRule` [INFO] [stdout] --> src/rules/ffi.rs:1283:5 [INFO] [stdout] | [INFO] [stdout] 1283 | / pub fn new() -> Self { [INFO] [stdout] 1284 | | Self { [INFO] [stdout] 1285 | | metadata: RuleMetadata { [INFO] [stdout] 1286 | | id: "RUSTCOLA107".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1303 | | } [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] 1282 + impl Default for EmbeddedInterpreterUsageRule { [INFO] [stdout] 1283 + fn default() -> Self { [INFO] [stdout] 1284 + Self::new() [INFO] [stdout] 1285 + } [INFO] [stdout] 1286 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/ffi.rs:1354:27 [INFO] [stdout] | [INFO] [stdout] 1354 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `WasmLinearMemoryOobRule` [INFO] [stdout] --> src/rules/ffi.rs:1446:5 [INFO] [stdout] | [INFO] [stdout] 1446 | / pub fn new() -> Self { [INFO] [stdout] 1447 | | Self { [INFO] [stdout] 1448 | | metadata: RuleMetadata { [INFO] [stdout] 1449 | | id: "RUSTCOLA103".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1465 | | } [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] 1445 + impl Default for WasmLinearMemoryOobRule { [INFO] [stdout] 1446 + fn default() -> Self { [INFO] [stdout] 1447 + Self::new() [INFO] [stdout] 1448 + } [INFO] [stdout] 1449 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/ffi.rs:1528:27 [INFO] [stdout] | [INFO] [stdout] 1528 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/rules/ffi.rs:1594:36 [INFO] [stdout] | [INFO] [stdout] 1594 | ... .split(|c| c == '(' || c == '<') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['(', '<']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `WasmHostFunctionTrustRule` [INFO] [stdout] --> src/rules/ffi.rs:1664:5 [INFO] [stdout] | [INFO] [stdout] 1664 | / pub fn new() -> Self { [INFO] [stdout] 1665 | | Self { [INFO] [stdout] 1666 | | metadata: RuleMetadata { [INFO] [stdout] 1667 | | id: "RUSTCOLA126".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1682 | | } [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] 1663 + impl Default for WasmHostFunctionTrustRule { [INFO] [stdout] 1664 + fn default() -> Self { [INFO] [stdout] 1665 + Self::new() [INFO] [stdout] 1666 + } [INFO] [stdout] 1667 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `WasmCapabilityLeakRule` [INFO] [stdout] --> src/rules/ffi.rs:1836:5 [INFO] [stdout] | [INFO] [stdout] 1836 | / pub fn new() -> Self { [INFO] [stdout] 1837 | | Self { [INFO] [stdout] 1838 | | metadata: RuleMetadata { [INFO] [stdout] 1839 | | id: "RUSTCOLA127".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1856 | | } [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] 1835 + impl Default for WasmCapabilityLeakRule { [INFO] [stdout] 1836 + fn default() -> Self { [INFO] [stdout] 1837 + Self::new() [INFO] [stdout] 1838 + } [INFO] [stdout] 1839 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UntrustedEnvInputRule` [INFO] [stdout] --> src/rules/injection.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | / pub fn new() -> Self { [INFO] [stdout] 33 | | Self { [INFO] [stdout] 34 | | metadata: RuleMetadata { [INFO] [stdout] 35 | | id: "RUSTCOLA006".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 47 | | } [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] 31 + impl Default for UntrustedEnvInputRule { [INFO] [stdout] 32 + fn default() -> Self { [INFO] [stdout] 33 + Self::new() [INFO] [stdout] 34 + } [INFO] [stdout] 35 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `CommandInjectionRiskRule` [INFO] [stdout] --> src/rules/injection.rs:91:5 [INFO] [stdout] | [INFO] [stdout] 91 | / pub fn new() -> Self { [INFO] [stdout] 92 | | Self { [INFO] [stdout] 93 | | metadata: RuleMetadata { [INFO] [stdout] 94 | | id: "RUSTCOLA007".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 106 | | } [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] 90 + impl Default for CommandInjectionRiskRule { [INFO] [stdout] 91 + fn default() -> Self { [INFO] [stdout] 92 + Self::new() [INFO] [stdout] 93 + } [INFO] [stdout] 94 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `CommandArgConcatenationRule` [INFO] [stdout] --> src/rules/injection.rs:191:5 [INFO] [stdout] | [INFO] [stdout] 191 | / pub fn new() -> Self { [INFO] [stdout] 192 | | Self { [INFO] [stdout] 193 | | metadata: RuleMetadata { [INFO] [stdout] 194 | | id: "RUSTCOLA031".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 206 | | } [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] 190 + impl Default for CommandArgConcatenationRule { [INFO] [stdout] 191 + fn default() -> Self { [INFO] [stdout] 192 + Self::new() [INFO] [stdout] 193 + } [INFO] [stdout] 194 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `LogInjectionRule` [INFO] [stdout] --> src/rules/injection.rs:320:5 [INFO] [stdout] | [INFO] [stdout] 320 | / pub fn new() -> Self { [INFO] [stdout] 321 | | Self { [INFO] [stdout] 322 | | metadata: RuleMetadata { [INFO] [stdout] 323 | | id: "RUSTCOLA076".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 340 | | } [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] 319 + impl Default for LogInjectionRule { [INFO] [stdout] 320 + fn default() -> Self { [INFO] [stdout] 321 + Self::new() [INFO] [stdout] 322 + } [INFO] [stdout] 323 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `RegexInjectionRule` [INFO] [stdout] --> src/rules/injection.rs:609:5 [INFO] [stdout] | [INFO] [stdout] 609 | / pub fn new() -> Self { [INFO] [stdout] 610 | | Self { [INFO] [stdout] 611 | | metadata: RuleMetadata { [INFO] [stdout] 612 | | id: "RUSTCOLA079".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 631 | | } [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] 608 + impl Default for RegexInjectionRule { [INFO] [stdout] 609 + fn default() -> Self { [INFO] [stdout] 610 + Self::new() [INFO] [stdout] 611 + } [INFO] [stdout] 612 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UncheckedIndexRule` [INFO] [stdout] --> src/rules/injection.rs:1021:5 [INFO] [stdout] | [INFO] [stdout] 1021 | / pub fn new() -> Self { [INFO] [stdout] 1022 | | Self { [INFO] [stdout] 1023 | | metadata: RuleMetadata { [INFO] [stdout] 1024 | | id: "RUSTCOLA080".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1043 | | } [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] 1020 + impl Default for UncheckedIndexRule { [INFO] [stdout] 1021 + fn default() -> Self { [INFO] [stdout] 1022 + Self::new() [INFO] [stdout] 1023 + } [INFO] [stdout] 1024 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PathTraversalRule` [INFO] [stdout] --> src/rules/injection.rs:1429:5 [INFO] [stdout] | [INFO] [stdout] 1429 | / pub fn new() -> Self { [INFO] [stdout] 1430 | | Self { [INFO] [stdout] 1431 | | metadata: RuleMetadata { [INFO] [stdout] 1432 | | id: "RUSTCOLA086".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1451 | | } [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] 1428 + impl Default for PathTraversalRule { [INFO] [stdout] 1429 + fn default() -> Self { [INFO] [stdout] 1430 + Self::new() [INFO] [stdout] 1431 + } [INFO] [stdout] 1432 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/injection.rs:1561:25 [INFO] [stdout] | [INFO] [stdout] 1561 | / if self.contains_var(trimmed, &untrusted) { [INFO] [stdout] 1562 | | if !untrusted_vars.contains(&target) { [INFO] [stdout] 1563 | | untrusted_vars.insert(target.clone()); [INFO] [stdout] 1564 | | changed = true; [INFO] [stdout] 1565 | | } [INFO] [stdout] 1566 | | } [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] 1561 ~ if self.contains_var(trimmed, &untrusted) [INFO] [stdout] 1562 ~ && !untrusted_vars.contains(&target) { [INFO] [stdout] 1563 | untrusted_vars.insert(target.clone()); [INFO] [stdout] 1564 | changed = true; [INFO] [stdout] 1565 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/rules/injection.rs:1595:25 [INFO] [stdout] | [INFO] [stdout] 1595 | after_amp[4..].trim_end_matches(';') [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/rules/injection.rs:1594:34 [INFO] [stdout] | [INFO] [stdout] 1594 | let target = if after_amp.starts_with("mut ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 1594 ~ let target = if let Some() = after_amp.strip_prefix("mut ") { [INFO] [stdout] 1595 ~ .trim_end_matches(';') [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/injection.rs:1634:9 [INFO] [stdout] | [INFO] [stdout] 1634 | / if body_str.contains("switchInt(") { [INFO] [stdout] 1635 | | if body_str.contains("contains(") [INFO] [stdout] 1636 | | || body_str.contains("starts_with(") [INFO] [stdout] 1637 | | || body_str.contains("is_relative()") [INFO] [stdout] ... | [INFO] [stdout] 1642 | | } [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] 1634 ~ if body_str.contains("switchInt(") [INFO] [stdout] 1635 ~ && (body_str.contains("contains(") [INFO] [stdout] 1636 | || body_str.contains("starts_with(") [INFO] [stdout] 1637 | || body_str.contains("is_relative()") [INFO] [stdout] 1638 ~ || body_str.contains("strip_prefix(")) [INFO] [stdout] 1639 | { [INFO] [stdout] 1640 | return true; [INFO] [stdout] 1641 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SsrfRule` [INFO] [stdout] --> src/rules/injection.rs:1872:5 [INFO] [stdout] | [INFO] [stdout] 1872 | / pub fn new() -> Self { [INFO] [stdout] 1873 | | Self { [INFO] [stdout] 1874 | | metadata: RuleMetadata { [INFO] [stdout] 1875 | | id: "RUSTCOLA088".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1896 | | } [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] 1871 + impl Default for SsrfRule { [INFO] [stdout] 1872 + fn default() -> Self { [INFO] [stdout] 1873 + Self::new() [INFO] [stdout] 1874 + } [INFO] [stdout] 1875 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/injection.rs:2035:25 [INFO] [stdout] | [INFO] [stdout] 2035 | / if self.contains_var(trimmed, &untrusted) { [INFO] [stdout] 2036 | | if !untrusted_vars.contains(&target) { [INFO] [stdout] 2037 | | untrusted_vars.insert(target.clone()); [INFO] [stdout] 2038 | | changed = true; [INFO] [stdout] 2039 | | } [INFO] [stdout] 2040 | | } [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] 2035 ~ if self.contains_var(trimmed, &untrusted) [INFO] [stdout] 2036 ~ && !untrusted_vars.contains(&target) { [INFO] [stdout] 2037 | untrusted_vars.insert(target.clone()); [INFO] [stdout] 2038 | changed = true; [INFO] [stdout] 2039 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SqlInjectionRule` [INFO] [stdout] --> src/rules/injection.rs:2259:5 [INFO] [stdout] | [INFO] [stdout] 2259 | / pub fn new() -> Self { [INFO] [stdout] 2260 | | Self { [INFO] [stdout] 2261 | | metadata: RuleMetadata { [INFO] [stdout] 2262 | | id: "RUSTCOLA087".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 2279 | | } [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] 2258 + impl Default for SqlInjectionRule { [INFO] [stdout] 2259 + fn default() -> Self { [INFO] [stdout] 2260 + Self::new() [INFO] [stdout] 2261 + } [INFO] [stdout] 2262 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/injection.rs:2542:25 [INFO] [stdout] | [INFO] [stdout] 2542 | / if self.contains_var(trimmed, &untrusted) { [INFO] [stdout] 2543 | | if !untrusted_vars.contains(&target) { [INFO] [stdout] 2544 | | untrusted_vars.insert(target.clone()); [INFO] [stdout] 2545 | | changed = true; [INFO] [stdout] 2546 | | } [INFO] [stdout] 2547 | | } [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] 2542 ~ if self.contains_var(trimmed, &untrusted) [INFO] [stdout] 2543 ~ && !untrusted_vars.contains(&target) { [INFO] [stdout] 2544 | untrusted_vars.insert(target.clone()); [INFO] [stdout] 2545 | changed = true; [INFO] [stdout] 2546 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/injection.rs:2700:25 [INFO] [stdout] | [INFO] [stdout] 2700 | / if self.contains_var(trimmed, &untrusted) { [INFO] [stdout] 2701 | | if !untrusted_vars.contains(&target) { [INFO] [stdout] 2702 | | untrusted_vars.insert(target.clone()); [INFO] [stdout] 2703 | | changed = true; [INFO] [stdout] 2704 | | } [INFO] [stdout] 2705 | | } [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] 2700 ~ if self.contains_var(trimmed, &untrusted) [INFO] [stdout] 2701 ~ && !untrusted_vars.contains(&target) { [INFO] [stdout] 2702 | untrusted_vars.insert(target.clone()); [INFO] [stdout] 2703 | changed = true; [INFO] [stdout] 2704 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `InterProceduralCommandInjectionRule` [INFO] [stdout] --> src/rules/injection.rs:2939:5 [INFO] [stdout] | [INFO] [stdout] 2939 | / pub fn new() -> Self { [INFO] [stdout] 2940 | | Self { [INFO] [stdout] 2941 | | metadata: RuleMetadata { [INFO] [stdout] 2942 | | id: "RUSTCOLA098".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 2960 | | } [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] 2938 + impl Default for InterProceduralCommandInjectionRule { [INFO] [stdout] 2939 + fn default() -> Self { [INFO] [stdout] 2940 + Self::new() [INFO] [stdout] 2941 + } [INFO] [stdout] 2942 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/injection.rs:2995:17 [INFO] [stdout] | [INFO] [stdout] 2995 | / if flow.sink_function.contains("test") && flow.sink_function.contains("::") { [INFO] [stdout] 2996 | | if !flow.sink_function.starts_with("test_") { [INFO] [stdout] 2997 | | continue; [INFO] [stdout] 2998 | | } [INFO] [stdout] 2999 | | } [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] 2995 ~ if flow.sink_function.contains("test") && flow.sink_function.contains("::") [INFO] [stdout] 2996 ~ && !flow.sink_function.starts_with("test_") { [INFO] [stdout] 2997 | continue; [INFO] [stdout] 2998 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `CleartextEnvVarRule` [INFO] [stdout] --> src/rules/input.rs:50:5 [INFO] [stdout] | [INFO] [stdout] 50 | / pub fn new() -> Self { [INFO] [stdout] 51 | | Self { [INFO] [stdout] 52 | | metadata: RuleMetadata { [INFO] [stdout] 53 | | id: "RUSTCOLA065".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 70 | | } [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] 49 + impl Default for CleartextEnvVarRule { [INFO] [stdout] 50 + fn default() -> Self { [INFO] [stdout] 51 + Self::new() [INFO] [stdout] 52 + } [INFO] [stdout] 53 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `EnvVarLiteralRule` [INFO] [stdout] --> src/rules/input.rs:169:5 [INFO] [stdout] | [INFO] [stdout] 169 | / pub fn new() -> Self { [INFO] [stdout] 170 | | Self { [INFO] [stdout] 171 | | metadata: RuleMetadata { [INFO] [stdout] 172 | | id: "RUSTCOLA047".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 188 | | } [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] 168 + impl Default for EnvVarLiteralRule { [INFO] [stdout] 169 + fn default() -> Self { [INFO] [stdout] 170 + Self::new() [INFO] [stdout] 171 + } [INFO] [stdout] 172 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `InvisibleUnicodeRule` [INFO] [stdout] --> src/rules/input.rs:261:5 [INFO] [stdout] | [INFO] [stdout] 261 | / pub fn new() -> Self { [INFO] [stdout] 262 | | Self { [INFO] [stdout] 263 | | metadata: RuleMetadata { [INFO] [stdout] 264 | | id: "RUSTCOLA048".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 280 | | } [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] 260 + impl Default for InvisibleUnicodeRule { [INFO] [stdout] 261 + fn default() -> Self { [INFO] [stdout] 262 + Self::new() [INFO] [stdout] 263 + } [INFO] [stdout] 264 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UntrimmedStdinRule` [INFO] [stdout] --> src/rules/input.rs:374:5 [INFO] [stdout] | [INFO] [stdout] 374 | / pub fn new() -> Self { [INFO] [stdout] 375 | | Self { [INFO] [stdout] 376 | | metadata: RuleMetadata { [INFO] [stdout] 377 | | id: "RUSTCOLA053".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 393 | | } [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] 373 + impl Default for UntrimmedStdinRule { [INFO] [stdout] 374 + fn default() -> Self { [INFO] [stdout] 375 + Self::new() [INFO] [stdout] 376 + } [INFO] [stdout] 377 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `InfiniteIteratorRule` [INFO] [stdout] --> src/rules/input.rs:473:5 [INFO] [stdout] | [INFO] [stdout] 473 | / pub fn new() -> Self { [INFO] [stdout] 474 | | Self { [INFO] [stdout] 475 | | metadata: RuleMetadata { [INFO] [stdout] 476 | | id: "RUSTCOLA054".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 492 | | } [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] 472 + impl Default for InfiniteIteratorRule { [INFO] [stdout] 473 + fn default() -> Self { [INFO] [stdout] 474 + Self::new() [INFO] [stdout] 475 + } [INFO] [stdout] 476 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `DivisionByUntrustedRule` [INFO] [stdout] --> src/rules/input.rs:609:5 [INFO] [stdout] | [INFO] [stdout] 609 | / pub fn new() -> Self { [INFO] [stdout] 610 | | Self { [INFO] [stdout] 611 | | metadata: RuleMetadata { [INFO] [stdout] 612 | | id: "RUSTCOLA077".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 628 | | } [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] 608 + impl Default for DivisionByUntrustedRule { [INFO] [stdout] 609 + fn default() -> Self { [INFO] [stdout] 610 + Self::new() [INFO] [stdout] 611 + } [INFO] [stdout] 612 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `InsecureYamlDeserializationRule` [INFO] [stdout] --> src/rules/input.rs:810:5 [INFO] [stdout] | [INFO] [stdout] 810 | / pub fn new() -> Self { [INFO] [stdout] 811 | | Self { [INFO] [stdout] 812 | | metadata: RuleMetadata { [INFO] [stdout] 813 | | id: "RUSTCOLA089".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 832 | | } [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] 809 + impl Default for InsecureYamlDeserializationRule { [INFO] [stdout] 810 + fn default() -> Self { [INFO] [stdout] 811 + Self::new() [INFO] [stdout] 812 + } [INFO] [stdout] 813 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UnboundedReadRule` [INFO] [stdout] --> src/rules/input.rs:1069:5 [INFO] [stdout] | [INFO] [stdout] 1069 | / pub fn new() -> Self { [INFO] [stdout] 1070 | | Self { [INFO] [stdout] 1071 | | metadata: RuleMetadata { [INFO] [stdout] 1072 | | id: "RUSTCOLA090".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1088 | | } [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] 1068 + impl Default for UnboundedReadRule { [INFO] [stdout] 1069 + fn default() -> Self { [INFO] [stdout] 1070 + Self::new() [INFO] [stdout] 1071 + } [INFO] [stdout] 1072 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `InsecureJsonTomlDeserializationRule` [INFO] [stdout] --> src/rules/input.rs:1233:5 [INFO] [stdout] | [INFO] [stdout] 1233 | / pub fn new() -> Self { [INFO] [stdout] 1234 | | Self { [INFO] [stdout] 1235 | | metadata: RuleMetadata { [INFO] [stdout] 1236 | | id: "RUSTCOLA091".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1254 | | } [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] 1232 + impl Default for InsecureJsonTomlDeserializationRule { [INFO] [stdout] 1233 + fn default() -> Self { [INFO] [stdout] 1234 + Self::new() [INFO] [stdout] 1235 + } [INFO] [stdout] 1236 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SerdeLengthMismatchRule` [INFO] [stdout] --> src/rules/input.rs:1461:5 [INFO] [stdout] | [INFO] [stdout] 1461 | / pub fn new() -> Self { [INFO] [stdout] 1462 | | Self { [INFO] [stdout] 1463 | | metadata: RuleMetadata { [INFO] [stdout] 1464 | | id: "RUSTCOLA081".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1481 | | } [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] 1460 + impl Default for SerdeLengthMismatchRule { [INFO] [stdout] 1461 + fn default() -> Self { [INFO] [stdout] 1462 + Self::new() [INFO] [stdout] 1463 + } [INFO] [stdout] 1464 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UncheckedTimestampMultiplicationRule` [INFO] [stdout] --> src/rules/input.rs:1863:5 [INFO] [stdout] | [INFO] [stdout] 1863 | / pub fn new() -> Self { [INFO] [stdout] 1864 | | Self { [INFO] [stdout] 1865 | | metadata: RuleMetadata { [INFO] [stdout] 1866 | | id: "RUSTCOLA106".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1882 | | } [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] 1862 + impl Default for UncheckedTimestampMultiplicationRule { [INFO] [stdout] 1863 + fn default() -> Self { [INFO] [stdout] 1864 + Self::new() [INFO] [stdout] 1865 + } [INFO] [stdout] 1866 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/input.rs:1923:27 [INFO] [stdout] | [INFO] [stdout] 1923 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `BoxIntoRawRule` [INFO] [stdout] --> src/rules/memory.rs:326:5 [INFO] [stdout] | [INFO] [stdout] 326 | / pub fn new() -> Self { [INFO] [stdout] 327 | | Self { [INFO] [stdout] 328 | | metadata: RuleMetadata { [INFO] [stdout] 329 | | id: "RUSTCOLA001".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 341 | | } [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] 325 + impl Default for BoxIntoRawRule { [INFO] [stdout] 326 + fn default() -> Self { [INFO] [stdout] 327 + Self::new() [INFO] [stdout] 328 + } [INFO] [stdout] 329 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `TransmuteRule` [INFO] [stdout] --> src/rules/memory.rs:410:5 [INFO] [stdout] | [INFO] [stdout] 410 | / pub fn new() -> Self { [INFO] [stdout] 411 | | Self { [INFO] [stdout] 412 | | metadata: RuleMetadata { [INFO] [stdout] 413 | | id: "RUSTCOLA002".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 425 | | } [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] 409 + impl Default for TransmuteRule { [INFO] [stdout] 410 + fn default() -> Self { [INFO] [stdout] 411 + Self::new() [INFO] [stdout] 412 + } [INFO] [stdout] 413 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UnsafeUsageRule` [INFO] [stdout] --> src/rules/memory.rs:522:5 [INFO] [stdout] | [INFO] [stdout] 522 | / pub fn new() -> Self { [INFO] [stdout] 523 | | Self { [INFO] [stdout] 524 | | metadata: RuleMetadata { [INFO] [stdout] 525 | | id: "RUSTCOLA003".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 537 | | } [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] 521 + impl Default for UnsafeUsageRule { [INFO] [stdout] 522 + fn default() -> Self { [INFO] [stdout] 523 + Self::new() [INFO] [stdout] 524 + } [INFO] [stdout] 525 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `NullPointerTransmuteRule` [INFO] [stdout] --> src/rules/memory.rs:626:5 [INFO] [stdout] | [INFO] [stdout] 626 | / pub fn new() -> Self { [INFO] [stdout] 627 | | Self { [INFO] [stdout] 628 | | metadata: RuleMetadata { [INFO] [stdout] 629 | | id: "RUSTCOLA063".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 641 | | } [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] 625 + impl Default for NullPointerTransmuteRule { [INFO] [stdout] 626 + fn default() -> Self { [INFO] [stdout] 627 + Self::new() [INFO] [stdout] 628 + } [INFO] [stdout] 629 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ZSTPointerArithmeticRule` [INFO] [stdout] --> src/rules/memory.rs:713:5 [INFO] [stdout] | [INFO] [stdout] 713 | / pub fn new() -> Self { [INFO] [stdout] 714 | | Self { [INFO] [stdout] 715 | | metadata: RuleMetadata { [INFO] [stdout] 716 | | id: "RUSTCOLA064".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 728 | | } [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] 712 + impl Default for ZSTPointerArithmeticRule { [INFO] [stdout] 713 + fn default() -> Self { [INFO] [stdout] 714 + Self::new() [INFO] [stdout] 715 + } [INFO] [stdout] 716 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `VecSetLenRule` [INFO] [stdout] --> src/rules/memory.rs:802:5 [INFO] [stdout] | [INFO] [stdout] 802 | / pub fn new() -> Self { [INFO] [stdout] 803 | | Self { [INFO] [stdout] 804 | | metadata: RuleMetadata { [INFO] [stdout] 805 | | id: "RUSTCOLA008".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 820 | | } [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] 801 + impl Default for VecSetLenRule { [INFO] [stdout] 802 + fn default() -> Self { [INFO] [stdout] 803 + Self::new() [INFO] [stdout] 804 + } [INFO] [stdout] 805 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `MaybeUninitAssumeInitRule` [INFO] [stdout] --> src/rules/memory.rs:913:5 [INFO] [stdout] | [INFO] [stdout] 913 | / pub fn new() -> Self { [INFO] [stdout] 914 | | Self { [INFO] [stdout] 915 | | metadata: RuleMetadata { [INFO] [stdout] 916 | | id: "RUSTCOLA009".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 934 | | } [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] 912 + impl Default for MaybeUninitAssumeInitRule { [INFO] [stdout] 913 + fn default() -> Self { [INFO] [stdout] 914 + Self::new() [INFO] [stdout] 915 + } [INFO] [stdout] 916 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded use of `concat!` macro [INFO] [stdout] --> src/rules/memory.rs:991:33 [INFO] [stdout] | [INFO] [stdout] 991 | const MEM_MODULE_SYMBOL: &str = concat!("mem"); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace with: `"mem"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_concat [INFO] [stdout] = note: `#[warn(clippy::useless_concat)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded use of `concat!` macro [INFO] [stdout] --> src/rules/memory.rs:992:40 [INFO] [stdout] | [INFO] [stdout] 992 | const MEM_UNINITIALIZED_SYMBOL: &str = concat!("uninitialized"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `"uninitialized"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_concat [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded use of `concat!` macro [INFO] [stdout] --> src/rules/memory.rs:993:33 [INFO] [stdout] | [INFO] [stdout] 993 | const MEM_ZEROED_SYMBOL: &str = concat!("zeroed"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace with: `"zeroed"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_concat [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `MemUninitZeroedRule` [INFO] [stdout] --> src/rules/memory.rs:1000:5 [INFO] [stdout] | [INFO] [stdout] 1000 | / pub fn new() -> Self { [INFO] [stdout] 1001 | | Self { [INFO] [stdout] 1002 | | metadata: RuleMetadata { [INFO] [stdout] 1003 | | id: "RUSTCOLA010".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1027 | | } [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] 999 + impl Default for MemUninitZeroedRule { [INFO] [stdout] 1000 + fn default() -> Self { [INFO] [stdout] 1001 + Self::new() [INFO] [stdout] 1002 + } [INFO] [stdout] 1003 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `NonNullNewUncheckedRule` [INFO] [stdout] --> src/rules/memory.rs:1099:5 [INFO] [stdout] | [INFO] [stdout] 1099 | / pub fn new() -> Self { [INFO] [stdout] 1100 | | Self { [INFO] [stdout] 1101 | | metadata: RuleMetadata { [INFO] [stdout] 1102 | | id: "RUSTCOLA073".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1114 | | } [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] 1098 + impl Default for NonNullNewUncheckedRule { [INFO] [stdout] 1099 + fn default() -> Self { [INFO] [stdout] 1100 + Self::new() [INFO] [stdout] 1101 + } [INFO] [stdout] 1102 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `MemForgetGuardRule` [INFO] [stdout] --> src/rules/memory.rs:1176:5 [INFO] [stdout] | [INFO] [stdout] 1176 | / pub fn new() -> Self { [INFO] [stdout] 1177 | | Self { [INFO] [stdout] 1178 | | metadata: RuleMetadata { [INFO] [stdout] 1179 | | id: "RUSTCOLA078".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1191 | | } [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] 1175 + impl Default for MemForgetGuardRule { [INFO] [stdout] 1176 + fn default() -> Self { [INFO] [stdout] 1177 + Self::new() [INFO] [stdout] 1178 + } [INFO] [stdout] 1179 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `StaticMutGlobalRule` [INFO] [stdout] --> src/rules/memory.rs:1279:5 [INFO] [stdout] | [INFO] [stdout] 1279 | / pub fn new() -> Self { [INFO] [stdout] 1280 | | Self { [INFO] [stdout] 1281 | | metadata: RuleMetadata { [INFO] [stdout] 1282 | | id: "RUSTCOLA025".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1294 | | } [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] 1278 + impl Default for StaticMutGlobalRule { [INFO] [stdout] 1279 + fn default() -> Self { [INFO] [stdout] 1280 + Self::new() [INFO] [stdout] 1281 + } [INFO] [stdout] 1282 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `TransmuteLifetimeChangeRule` [INFO] [stdout] --> src/rules/memory.rs:1360:5 [INFO] [stdout] | [INFO] [stdout] 1360 | / pub fn new() -> Self { [INFO] [stdout] 1361 | | Self { [INFO] [stdout] 1362 | | metadata: RuleMetadata { [INFO] [stdout] 1363 | | id: "RUSTCOLA095".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1375 | | } [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] 1359 + impl Default for TransmuteLifetimeChangeRule { [INFO] [stdout] 1360 + fn default() -> Self { [INFO] [stdout] 1361 + Self::new() [INFO] [stdout] 1362 + } [INFO] [stdout] 1363 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/memory.rs:1434:27 [INFO] [stdout] | [INFO] [stdout] 1434 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/memory.rs:1523:25 [INFO] [stdout] | [INFO] [stdout] 1523 | / if back_line.starts_with("pub fn ") || back_line.starts_with("fn ") { [INFO] [stdout] 1524 | | if !back_line.contains("->") { [INFO] [stdout] 1525 | | break; [INFO] [stdout] 1526 | | } [INFO] [stdout] 1527 | | } [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] 1523 ~ if (back_line.starts_with("pub fn ") || back_line.starts_with("fn ")) { [INFO] [stdout] 1524 ~ && !back_line.contains("->") { [INFO] [stdout] 1525 | break; [INFO] [stdout] 1526 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `RawPointerEscapeRule` [INFO] [stdout] --> src/rules/memory.rs:1634:5 [INFO] [stdout] | [INFO] [stdout] 1634 | / pub fn new() -> Self { [INFO] [stdout] 1635 | | Self { [INFO] [stdout] 1636 | | metadata: RuleMetadata { [INFO] [stdout] 1637 | | id: "RUSTCOLA096".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1649 | | } [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] 1633 + impl Default for RawPointerEscapeRule { [INFO] [stdout] 1634 + fn default() -> Self { [INFO] [stdout] 1635 + Self::new() [INFO] [stdout] 1636 + } [INFO] [stdout] 1637 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/memory.rs:1710:9 [INFO] [stdout] | [INFO] [stdout] 1710 | / if (line.starts_with("*") && line.contains(" = ")) [INFO] [stdout] 1711 | | && (line.contains("as *const") || line.contains("as *mut")) [INFO] [stdout] 1712 | | { [INFO] [stdout] 1713 | | if line.contains("&") { [INFO] [stdout] ... | [INFO] [stdout] 1716 | | } [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] 1711 ~ && (line.contains("as *const") || line.contains("as *mut")) [INFO] [stdout] 1712 ~ && line.contains("&") { [INFO] [stdout] 1713 | return true; [INFO] [stdout] 1714 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/memory.rs:1718:9 [INFO] [stdout] | [INFO] [stdout] 1718 | / if line.contains("GLOBAL") || line.contains("STATIC") { [INFO] [stdout] 1719 | | if line.contains("as *const") || line.contains("as *mut") { [INFO] [stdout] 1720 | | return true; [INFO] [stdout] 1721 | | } [INFO] [stdout] 1722 | | } [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] 1718 ~ if (line.contains("GLOBAL") || line.contains("STATIC")) { [INFO] [stdout] 1719 ~ && (line.contains("as *const") || line.contains("as *mut")) { [INFO] [stdout] 1720 | return true; [INFO] [stdout] 1721 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/memory.rs:1730:9 [INFO] [stdout] | [INFO] [stdout] 1730 | / if fn_context.contains("fn ") && fn_context.contains("(&") { [INFO] [stdout] 1731 | | if !line.contains("let ") && (line.contains(" x ") || line.contains("(x)")) { [INFO] [stdout] 1732 | | return true; [INFO] [stdout] 1733 | | } [INFO] [stdout] 1734 | | } [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] 1730 ~ if fn_context.contains("fn ") && fn_context.contains("(&") [INFO] [stdout] 1731 ~ && !line.contains("let ") && (line.contains(" x ") || line.contains("(x)")) { [INFO] [stdout] 1732 | return true; [INFO] [stdout] 1733 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/rules/memory.rs:1760:34 [INFO] [stdout] | [INFO] [stdout] 1760 | let next_lines: String = lines[idx..std::cmp::min(idx + 5, lines.len())] [INFO] [stdout] | __________________________________^ [INFO] [stdout] 1761 | | .iter() [INFO] [stdout] 1762 | | .map(|s| *s) [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 1760 ~ let next_lines: String = lines[idx..std::cmp::min(idx + 5, lines.len())] [INFO] [stdout] 1761 + .iter().copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/rules/memory.rs:1892:24 [INFO] [stdout] | [INFO] [stdout] 1892 | if ((returns_ptr || escapes_via_return || escapes_via_store) && is_local_cast) [INFO] [stdout] | ________________________^ [INFO] [stdout] 1893 | | || (is_deref_assign && is_local_cast) [INFO] [stdout] | |_____________________________________________________________^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 1892 - if ((returns_ptr || escapes_via_return || escapes_via_store) && is_local_cast) [INFO] [stdout] 1893 - || (is_deref_assign && is_local_cast) [INFO] [stdout] 1892 + if !(!is_local_cast || !returns_ptr && !escapes_via_return && !escapes_via_store && !is_deref_assign) [INFO] [stdout] | [INFO] [stdout] 1892 - if ((returns_ptr || escapes_via_return || escapes_via_store) && is_local_cast) [INFO] [stdout] 1893 - || (is_deref_assign && is_local_cast) [INFO] [stdout] 1892 + if (is_deref_assign || escapes_via_store || escapes_via_return || returns_ptr) && is_local_cast [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/memory.rs:1796:27 [INFO] [stdout] | [INFO] [stdout] 1796 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you are using an explicit closure for copying elements [INFO] [stdout] --> src/rules/memory.rs:1854:46 [INFO] [stdout] | [INFO] [stdout] 1854 | let fn_context: String = lines[current_fn_start..=idx.min(lines.len() - 1)] [INFO] [stdout] | ______________________________________________^ [INFO] [stdout] 1855 | | .iter() [INFO] [stdout] 1856 | | .take(20) [INFO] [stdout] 1857 | | .map(|s| *s) [INFO] [stdout] | |____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 1854 ~ let fn_context: String = lines[current_fn_start..=idx.min(lines.len() - 1)] [INFO] [stdout] 1855 + .iter() [INFO] [stdout] 1856 + .take(20).copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `VecSetLenMisuseRule` [INFO] [stdout] --> src/rules/memory.rs:1930:5 [INFO] [stdout] | [INFO] [stdout] 1930 | / pub fn new() -> Self { [INFO] [stdout] 1931 | | Self { [INFO] [stdout] 1932 | | metadata: RuleMetadata { [INFO] [stdout] 1933 | | id: "RUSTCOLA038".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1945 | | } [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] 1929 + impl Default for VecSetLenMisuseRule { [INFO] [stdout] 1930 + fn default() -> Self { [INFO] [stdout] 1931 + Self::new() [INFO] [stdout] 1932 + } [INFO] [stdout] 1933 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/memory.rs:1985:27 [INFO] [stdout] | [INFO] [stdout] 1985 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `LengthTruncationCastRule` [INFO] [stdout] --> src/rules/memory.rs:2103:5 [INFO] [stdout] | [INFO] [stdout] 2103 | / pub fn new() -> Self { [INFO] [stdout] 2104 | | Self { [INFO] [stdout] 2105 | | metadata: RuleMetadata { [INFO] [stdout] 2106 | | id: "RUSTCOLA022".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 2118 | | } [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] 2102 + impl Default for LengthTruncationCastRule { [INFO] [stdout] 2103 + fn default() -> Self { [INFO] [stdout] 2104 + Self::new() [INFO] [stdout] 2105 + } [INFO] [stdout] 2106 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `MaybeUninitAssumeInitDataflowRule` [INFO] [stdout] --> src/rules/memory.rs:2189:5 [INFO] [stdout] | [INFO] [stdout] 2189 | / pub fn new() -> Self { [INFO] [stdout] 2190 | | Self { [INFO] [stdout] 2191 | | metadata: RuleMetadata { [INFO] [stdout] 2192 | | id: "RUSTCOLA078".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 2211 | | } [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] 2188 + impl Default for MaybeUninitAssumeInitDataflowRule { [INFO] [stdout] 2189 + fn default() -> Self { [INFO] [stdout] 2190 + Self::new() [INFO] [stdout] 2191 + } [INFO] [stdout] 2192 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SliceElementSizeMismatchRule` [INFO] [stdout] --> src/rules/memory.rs:2361:5 [INFO] [stdout] | [INFO] [stdout] 2361 | / pub fn new() -> Self { [INFO] [stdout] 2362 | | Self { [INFO] [stdout] 2363 | | metadata: RuleMetadata { [INFO] [stdout] 2364 | | id: "RUSTCOLA082".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 2381 | | } [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] 2360 + impl Default for SliceElementSizeMismatchRule { [INFO] [stdout] 2361 + fn default() -> Self { [INFO] [stdout] 2362 + Self::new() [INFO] [stdout] 2363 + } [INFO] [stdout] 2364 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SliceFromRawPartsRule` [INFO] [stdout] --> src/rules/memory.rs:2756:5 [INFO] [stdout] | [INFO] [stdout] 2756 | / pub fn new() -> Self { [INFO] [stdout] 2757 | | Self { [INFO] [stdout] 2758 | | metadata: RuleMetadata { [INFO] [stdout] 2759 | | id: "RUSTCOLA083".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 2777 | | } [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] 2755 + impl Default for SliceFromRawPartsRule { [INFO] [stdout] 2756 + fn default() -> Self { [INFO] [stdout] 2757 + Self::new() [INFO] [stdout] 2758 + } [INFO] [stdout] 2759 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/memory.rs:2784:17 [INFO] [stdout] | [INFO] [stdout] 2784 | / if line.contains(&format!("{} = ", var_name)) { [INFO] [stdout] 2785 | | if line.contains("::len(") [INFO] [stdout] 2786 | | || line.contains(">::len(") [INFO] [stdout] 2787 | | || line.contains(".len()") [INFO] [stdout] ... | [INFO] [stdout] 2791 | | } [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] 2784 ~ if line.contains(&format!("{} = ", var_name)) [INFO] [stdout] 2785 ~ && (line.contains("::len(") [INFO] [stdout] 2786 | || line.contains(">::len(") [INFO] [stdout] 2787 ~ || line.contains(".len()")) [INFO] [stdout] 2788 | { [INFO] [stdout] 2789 | return true; [INFO] [stdout] 2790 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/memory.rs:2795:9 [INFO] [stdout] | [INFO] [stdout] 2795 | / if var_name.contains("count") { [INFO] [stdout] 2796 | | if body_str.contains("Layout::array") || body_str.contains("with_capacity") { [INFO] [stdout] 2797 | | return true; [INFO] [stdout] 2798 | | } [INFO] [stdout] 2799 | | } [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] 2795 ~ if var_name.contains("count") [INFO] [stdout] 2796 ~ && (body_str.contains("Layout::array") || body_str.contains("with_capacity")) { [INFO] [stdout] 2797 | return true; [INFO] [stdout] 2798 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/memory.rs:2824:9 [INFO] [stdout] | [INFO] [stdout] 2824 | / if body_str.contains("::min(") { [INFO] [stdout] 2825 | | if body_str.contains(&format!("copy {}", len_var)) [INFO] [stdout] 2826 | | || body_str.contains(&format!("move {}", len_var)) [INFO] [stdout] ... | [INFO] [stdout] 2834 | | } [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] 2824 ~ if body_str.contains("::min(") [INFO] [stdout] 2825 ~ && (body_str.contains(&format!("copy {}", len_var)) [INFO] [stdout] 2826 ~ || body_str.contains(&format!("move {}", len_var))) [INFO] [stdout] 2827 | { [INFO] [stdout] ... [INFO] [stdout] 2832 | } [INFO] [stdout] 2833 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/memory.rs:2852:13 [INFO] [stdout] | [INFO] [stdout] 2852 | / if line.contains("assert") { [INFO] [stdout] 2853 | | if line.contains(&format!("Le(copy {}", len_var)) [INFO] [stdout] 2854 | | || line.contains(&format!("Lt(copy {}", len_var)) [INFO] [stdout] 2855 | | || line.contains(&format!("Le(move {}", len_var)) [INFO] [stdout] ... | [INFO] [stdout] 2860 | | } [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] 2852 ~ if line.contains("assert") [INFO] [stdout] 2853 ~ && (line.contains(&format!("Le(copy {}", len_var)) [INFO] [stdout] 2854 | || line.contains(&format!("Lt(copy {}", len_var)) [INFO] [stdout] 2855 | || line.contains(&format!("Le(move {}", len_var)) [INFO] [stdout] 2856 ~ || line.contains(&format!("Lt(move {}", len_var))) [INFO] [stdout] 2857 | { [INFO] [stdout] 2858 | return true; [INFO] [stdout] 2859 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/memory.rs:2884:9 [INFO] [stdout] | [INFO] [stdout] 2884 | / if body_str.contains("env::var") || body_str.contains("var::<") { [INFO] [stdout] 2885 | | if body_str.contains("parse") { [INFO] [stdout] 2886 | | return true; [INFO] [stdout] 2887 | | } [INFO] [stdout] 2888 | | } [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] 2884 ~ if (body_str.contains("env::var") || body_str.contains("var::<")) { [INFO] [stdout] 2885 ~ && body_str.contains("parse") { [INFO] [stdout] 2886 | return true; [INFO] [stdout] 2887 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rules/memory.rs:2968:13 [INFO] [stdout] | [INFO] [stdout] 2968 | / if trimmed.contains(&format!("{} = Div(", len_var)) { [INFO] [stdout] 2969 | | if trimmed.contains("const 2_usize") { [INFO] [stdout] 2970 | | return Some("length divided by 2 may not match element size".to_string()); [INFO] [stdout] 2971 | | } [INFO] [stdout] 2972 | | } [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] 2968 ~ if trimmed.contains(&format!("{} = Div(", len_var)) [INFO] [stdout] 2969 ~ && trimmed.contains("const 2_usize") { [INFO] [stdout] 2970 | return Some("length divided by 2 may not match element size".to_string()); [INFO] [stdout] 2971 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `VarianceTransmuteUnsoundRule` [INFO] [stdout] --> src/rules/memory.rs:3193:5 [INFO] [stdout] | [INFO] [stdout] 3193 | / pub fn new() -> Self { [INFO] [stdout] 3194 | | Self { [INFO] [stdout] 3195 | | metadata: RuleMetadata { [INFO] [stdout] 3196 | | id: "RUSTCOLA101".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 3209 | | } [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] 3192 + impl Default for VarianceTransmuteUnsoundRule { [INFO] [stdout] 3193 + fn default() -> Self { [INFO] [stdout] 3194 + Self::new() [INFO] [stdout] 3195 + } [INFO] [stdout] 3196 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ReturnedRefToLocalRule` [INFO] [stdout] --> src/rules/memory.rs:3388:5 [INFO] [stdout] | [INFO] [stdout] 3388 | / pub fn new() -> Self { [INFO] [stdout] 3389 | | Self { [INFO] [stdout] 3390 | | metadata: RuleMetadata { [INFO] [stdout] 3391 | | id: "RUSTCOLA118".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 3406 | | } [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] 3387 + impl Default for ReturnedRefToLocalRule { [INFO] [stdout] 3388 + fn default() -> Self { [INFO] [stdout] 3389 + Self::new() [INFO] [stdout] 3390 + } [INFO] [stdout] 3391 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/memory.rs:3444:27 [INFO] [stdout] | [INFO] [stdout] 3444 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: you should consider adding a `Default` implementation for `SelfReferentialStructRule` [INFO] [stdout] --> src/rules/memory.rs:3612:5 [INFO] [stdout] | [INFO] [stdout] 3612 | / pub fn new() -> Self { [INFO] [stdout] 3613 | | Self { [INFO] [stdout] 3614 | | metadata: RuleMetadata { [INFO] [stdout] 3615 | | id: "RUSTCOLA120".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 3631 | | } [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] 3611 + impl Default for SelfReferentialStructRule { [INFO] [stdout] 3612 + fn default() -> Self { [INFO] [stdout] 3613 + Self::new() [INFO] [stdout] 3614 + } [INFO] [stdout] 3615 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/rules/memory.rs:3670:27 [INFO] [stdout] | [INFO] [stdout] 3670 | .filter_entry(|e| filter_entry(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_entry` [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: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/rules/memory.rs:3725:36 [INFO] [stdout] | [INFO] [stdout] 3725 | ... .split(|c| c == '<' || c == ' ' || c == '{') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['<', ' ', '{']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/rules/memory.rs:3732:36 [INFO] [stdout] | [INFO] [stdout] 3732 | ... .split(|c| c == '<' || c == ' ' || c == '{') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['<', ' ', '{']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UnsafeCellAliasingRule` [INFO] [stdout] --> src/rules/memory.rs:3804:5 [INFO] [stdout] | [INFO] [stdout] 3804 | / pub fn new() -> Self { [INFO] [stdout] 3805 | | Self { [INFO] [stdout] 3806 | | metadata: RuleMetadata { [INFO] [stdout] 3807 | | id: "RUSTCOLA128".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 3826 | | } [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] 3803 + impl Default for UnsafeCellAliasingRule { [INFO] [stdout] 3804 + fn default() -> Self { [INFO] [stdout] 3805 + Self::new() [INFO] [stdout] 3806 + } [INFO] [stdout] 3807 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `LazyInitPanicPoisonRule` [INFO] [stdout] --> src/rules/memory.rs:3996:5 [INFO] [stdout] | [INFO] [stdout] 3996 | / pub fn new() -> Self { [INFO] [stdout] 3997 | | Self { [INFO] [stdout] 3998 | | metadata: RuleMetadata { [INFO] [stdout] 3999 | | id: "RUSTCOLA129".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 4015 | | } [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] 3995 + impl Default for LazyInitPanicPoisonRule { [INFO] [stdout] 3996 + fn default() -> Self { [INFO] [stdout] 3997 + Self::new() [INFO] [stdout] 3998 + } [INFO] [stdout] 3999 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SpawnedChildNoWaitRule` [INFO] [stdout] --> src/rules/resource.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | / pub fn new() -> Self { [INFO] [stdout] 35 | | Self { [INFO] [stdout] 36 | | metadata: RuleMetadata { [INFO] [stdout] 37 | | id: "RUSTCOLA067".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 53 | | } [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] 33 + impl Default for SpawnedChildNoWaitRule { [INFO] [stdout] 34 + fn default() -> Self { [INFO] [stdout] 35 + Self::new() [INFO] [stdout] 36 + } [INFO] [stdout] 37 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PermissionsSetReadonlyFalseRule` [INFO] [stdout] --> src/rules/resource.rs:145:5 [INFO] [stdout] | [INFO] [stdout] 145 | / pub fn new() -> Self { [INFO] [stdout] 146 | | Self { [INFO] [stdout] 147 | | metadata: RuleMetadata { [INFO] [stdout] 148 | | id: "RUSTCOLA028".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 163 | | } [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] 144 + impl Default for PermissionsSetReadonlyFalseRule { [INFO] [stdout] 145 + fn default() -> Self { [INFO] [stdout] 146 + Self::new() [INFO] [stdout] 147 + } [INFO] [stdout] 148 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `WorldWritableModeRule` [INFO] [stdout] --> src/rules/resource.rs:231:5 [INFO] [stdout] | [INFO] [stdout] 231 | / pub fn new() -> Self { [INFO] [stdout] 232 | | Self { [INFO] [stdout] 233 | | metadata: RuleMetadata { [INFO] [stdout] 234 | | id: "RUSTCOLA029".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 249 | | } [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] 230 + impl Default for WorldWritableModeRule { [INFO] [stdout] 231 + fn default() -> Self { [INFO] [stdout] 232 + Self::new() [INFO] [stdout] 233 + } [INFO] [stdout] 234 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `OpenOptionsMissingTruncateRule` [INFO] [stdout] --> src/rules/resource.rs:314:5 [INFO] [stdout] | [INFO] [stdout] 314 | / pub fn new() -> Self { [INFO] [stdout] 315 | | Self { [INFO] [stdout] 316 | | metadata: RuleMetadata { [INFO] [stdout] 317 | | id: "RUSTCOLA032".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 331 | | } [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] 313 + impl Default for OpenOptionsMissingTruncateRule { [INFO] [stdout] 314 + fn default() -> Self { [INFO] [stdout] 315 + Self::new() [INFO] [stdout] 316 + } [INFO] [stdout] 317 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UnixPermissionsNotOctalRule` [INFO] [stdout] --> src/rules/resource.rs:442:5 [INFO] [stdout] | [INFO] [stdout] 442 | / pub fn new() -> Self { [INFO] [stdout] 443 | | Self { [INFO] [stdout] 444 | | metadata: RuleMetadata { [INFO] [stdout] 445 | | id: "RUSTCOLA055".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 462 | | } [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] 441 + impl Default for UnixPermissionsNotOctalRule { [INFO] [stdout] 442 + fn default() -> Self { [INFO] [stdout] 443 + Self::new() [INFO] [stdout] 444 + } [INFO] [stdout] 445 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `OpenOptionsInconsistentFlagsRule` [INFO] [stdout] --> src/rules/resource.rs:560:5 [INFO] [stdout] | [INFO] [stdout] 560 | / pub fn new() -> Self { [INFO] [stdout] 561 | | Self { [INFO] [stdout] 562 | | metadata: RuleMetadata { [INFO] [stdout] 563 | | id: "RUSTCOLA056".to_string(), [INFO] [stdout] ... | [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 559 + impl Default for OpenOptionsInconsistentFlagsRule { [INFO] [stdout] 560 + fn default() -> Self { [INFO] [stdout] 561 + Self::new() [INFO] [stdout] 562 + } [INFO] [stdout] 563 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `AbsolutePathInJoinRule` [INFO] [stdout] --> src/rules/resource.rs:675:5 [INFO] [stdout] | [INFO] [stdout] 675 | / pub fn new() -> Self { [INFO] [stdout] 676 | | Self { [INFO] [stdout] 677 | | metadata: RuleMetadata { [INFO] [stdout] 678 | | id: "RUSTCOLA058".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 694 | | } [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] 674 + impl Default for AbsolutePathInJoinRule { [INFO] [stdout] 675 + fn default() -> Self { [INFO] [stdout] 676 + Self::new() [INFO] [stdout] 677 + } [INFO] [stdout] 678 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `HardcodedHomePathRule` [INFO] [stdout] --> src/rules/resource.rs:807:5 [INFO] [stdout] | [INFO] [stdout] 807 | / pub fn new() -> Self { [INFO] [stdout] 808 | | Self { [INFO] [stdout] 809 | | metadata: RuleMetadata { [INFO] [stdout] 810 | | id: "RUSTCOLA014".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 822 | | } [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] 806 + impl Default for HardcodedHomePathRule { [INFO] [stdout] 807 + fn default() -> Self { [INFO] [stdout] 808 + Self::new() [INFO] [stdout] 809 + } [INFO] [stdout] 810 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `BuildScriptNetworkRule` [INFO] [stdout] --> src/rules/resource.rs:927:5 [INFO] [stdout] | [INFO] [stdout] 927 | / pub fn new() -> Self { [INFO] [stdout] 928 | | Self { [INFO] [stdout] 929 | | metadata: RuleMetadata { [INFO] [stdout] 930 | | id: "RUSTCOLA097".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 942 | | } [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] 926 + impl Default for BuildScriptNetworkRule { [INFO] [stdout] 927 + fn default() -> Self { [INFO] [stdout] 928 + Self::new() [INFO] [stdout] 929 + } [INFO] [stdout] 930 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UnboundedAllocationRule` [INFO] [stdout] --> src/rules/resource.rs:1093:5 [INFO] [stdout] | [INFO] [stdout] 1093 | / pub fn new() -> Self { [INFO] [stdout] 1094 | | Self { [INFO] [stdout] 1095 | | metadata: RuleMetadata { [INFO] [stdout] 1096 | | id: "RUSTCOLA024".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1108 | | } [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] 1092 + impl Default for UnboundedAllocationRule { [INFO] [stdout] 1093 + fn default() -> Self { [INFO] [stdout] 1094 + Self::new() [INFO] [stdout] 1095 + } [INFO] [stdout] 1096 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `RustsecUnsoundDependencyRule` [INFO] [stdout] --> src/rules/supply_chain.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | / pub fn new() -> Self { [INFO] [stdout] 37 | | Self { [INFO] [stdout] 38 | | metadata: RuleMetadata { [INFO] [stdout] 39 | | id: "RUSTCOLA018".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 51 | | } [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] 35 + impl Default for RustsecUnsoundDependencyRule { [INFO] [stdout] 36 + fn default() -> Self { [INFO] [stdout] 37 + Self::new() [INFO] [stdout] 38 + } [INFO] [stdout] 39 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `YankedCrateRule` [INFO] [stdout] --> src/rules/supply_chain.rs:211:5 [INFO] [stdout] | [INFO] [stdout] 211 | / pub fn new() -> Self { [INFO] [stdout] 212 | | Self { [INFO] [stdout] 213 | | metadata: RuleMetadata { [INFO] [stdout] 214 | | id: "RUSTCOLA019".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 231 | | } [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] 210 + impl Default for YankedCrateRule { [INFO] [stdout] 211 + fn default() -> Self { [INFO] [stdout] 212 + Self::new() [INFO] [stdout] 213 + } [INFO] [stdout] 214 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `CargoAuditableMetadataRule` [INFO] [stdout] --> src/rules/supply_chain.rs:337:5 [INFO] [stdout] | [INFO] [stdout] 337 | / pub fn new() -> Self { [INFO] [stdout] 338 | | Self { [INFO] [stdout] 339 | | metadata: RuleMetadata { [INFO] [stdout] 340 | | id: "RUSTCOLA020".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 352 | | } [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] 336 + impl Default for CargoAuditableMetadataRule { [INFO] [stdout] 337 + fn default() -> Self { [INFO] [stdout] 338 + Self::new() [INFO] [stdout] 339 + } [INFO] [stdout] 340 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/rules/supply_chain.rs:388:24 [INFO] [stdout] | [INFO] [stdout] 388 | && path [INFO] [stdout] | ________________________^ [INFO] [stdout] 389 | | .extension() [INFO] [stdout] 390 | | .and_then(OsStr::to_str) [INFO] [stdout] 391 | | .map_or(false, |ext| ext.eq_ignore_ascii_case("rs")) [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] 391 - .map_or(false, |ext| ext.eq_ignore_ascii_case("rs")) [INFO] [stdout] 391 + .is_some_and(|ext| ext.eq_ignore_ascii_case("rs")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/rules/supply_chain.rs:458:93 [INFO] [stdout] | [INFO] [stdout] 458 | ...y(items) if items.iter().any(|item| item.as_str().map_or(false, |s| s.contains("auditable")))) [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] 458 - || matches!(value, toml::Value::Array(items) if items.iter().any(|item| item.as_str().map_or(false, |s| s.contains("auditable")))) [INFO] [stdout] 458 + || matches!(value, toml::Value::Array(items) if items.iter().any(|item| item.as_str().is_some_and(|s| s.contains("auditable")))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ProcMacroSideEffectsRule` [INFO] [stdout] --> src/rules/supply_chain.rs:658:5 [INFO] [stdout] | [INFO] [stdout] 658 | / pub fn new() -> Self { [INFO] [stdout] 659 | | Self { [INFO] [stdout] 660 | | metadata: RuleMetadata { [INFO] [stdout] 661 | | id: "RUSTCOLA102".to_string(), [WARN] too many lines in the log, truncating it