[INFO] fetching crate mirage-analyzer 1.1.0... [INFO] linting mirage-analyzer-1.1.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate mirage-analyzer 1.1.0 into /workspace/builds/worker-3-tc1/source [INFO] started tweaking crates.io crate mirage-analyzer 1.1.0 [INFO] removed 0 missing tests [INFO] finished tweaking crates.io crate mirage-analyzer 1.1.0 [INFO] tweaked toml for crates.io crate mirage-analyzer 1.1.0 written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate mirage-analyzer 1.1.0 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate mirage-analyzer 1.1.0 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded r2d2_sqlite v0.24.0 [INFO] [stderr] Downloaded notify-debouncer-mini v0.7.0 [INFO] [stderr] Downloaded binrw v0.13.3 [INFO] [stderr] Downloaded scip v0.6.1 [INFO] [stderr] Downloaded binrw_derive v0.13.3 [INFO] [stderr] Downloaded rusqlite v0.31.0 [INFO] [stderr] Downloaded tree-sitter-javascript v0.21.4 [INFO] [stderr] Downloaded tree-sitter-java v0.21.0 [INFO] [stderr] Downloaded blake3 v1.5.3 [INFO] [stderr] Downloaded git2 v0.18.3 [INFO] [stderr] Downloaded tree-sitter v0.22.6 [INFO] [stderr] Downloaded tree-sitter-c v0.21.4 [INFO] [stderr] Downloaded tree-sitter-python v0.21.0 [INFO] [stderr] Downloaded tree-sitter-rust v0.21.2 [INFO] [stderr] Downloaded magellan v2.5.0 [INFO] [stderr] Downloaded tree-sitter-typescript v0.21.2 [INFO] [stderr] Downloaded tree-sitter-cpp v0.21.0 [INFO] [stderr] Downloaded sqlitegraph v2.0.7 [INFO] [stderr] Downloaded libgit2-sys v0.16.2+1.7.2 [INFO] [stderr] Downloaded libsqlite3-sys v0.28.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] d336f6c56ed140a937f6a5cb9ea58cae6d4fbc8e266b02897c6e15652cc21a48 [INFO] running `Command { std: "docker" "start" "-a" "d336f6c56ed140a937f6a5cb9ea58cae6d4fbc8e266b02897c6e15652cc21a48", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "d336f6c56ed140a937f6a5cb9ea58cae6d4fbc8e266b02897c6e15652cc21a48", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d336f6c56ed140a937f6a5cb9ea58cae6d4fbc8e266b02897c6e15652cc21a48", kill_on_drop: false }` [INFO] [stdout] d336f6c56ed140a937f6a5cb9ea58cae6d4fbc8e266b02897c6e15652cc21a48 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] abbf46986c40abd456cc8feb7ba483eb8d10acd562b7ca194acf42f8f826b3aa [INFO] running `Command { std: "docker" "start" "-a" "abbf46986c40abd456cc8feb7ba483eb8d10acd562b7ca194acf42f8f826b3aa", kill_on_drop: false }` [INFO] [stderr] Compiling zerocopy v0.8.37 [INFO] [stderr] Compiling ahash v0.8.12 [INFO] [stderr] Compiling proc-macro2 v1.0.106 [INFO] [stderr] Compiling cc v1.0.106 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking getrandom v0.2.17 [INFO] [stderr] Compiling zmij v1.0.18 [INFO] [stderr] Compiling binrw_derive v0.13.3 [INFO] [stderr] Checking inotify-sys v0.1.5 [INFO] [stderr] Compiling binrw v0.13.3 [INFO] [stderr] Checking fallible-iterator v0.3.0 [INFO] [stderr] Compiling owo-colors v3.5.0 [INFO] [stderr] Compiling protobuf v3.7.2 [INFO] [stderr] Checking notify-types v2.1.0 [INFO] [stderr] Checking mio v1.1.1 [INFO] [stderr] Checking fixedbitset v0.4.2 [INFO] [stderr] Checking inotify v0.11.0 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking array-init v2.1.0 [INFO] [stderr] Checking tempfile v3.24.0 [INFO] [stderr] Checking memmap2 v0.9.9 [INFO] [stderr] Compiling magellan v2.5.0 [INFO] [stderr] Checking clap_builder v4.5.56 [INFO] [stderr] Checking petgraph v0.6.5 [INFO] [stderr] Checking csv v1.4.0 [INFO] [stderr] Checking signal-hook v0.3.18 [INFO] [stderr] Checking ignore v0.4.25 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Checking fixedbitset v0.5.7 [INFO] [stderr] Checking is-terminal v0.4.17 [INFO] [stderr] Checking notify v8.2.0 [INFO] [stderr] Compiling quote v1.0.44 [INFO] [stderr] Checking serde_json v1.0.149 [INFO] [stderr] Checking petgraph v0.8.3 [INFO] [stderr] Checking scheduled-thread-pool v0.2.7 [INFO] [stderr] Checking notify-debouncer-mini v0.7.0 [INFO] [stderr] Checking r2d2 v0.8.10 [INFO] [stderr] Compiling syn v2.0.114 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling tree-sitter v0.22.6 [INFO] [stderr] Compiling libz-sys v1.1.23 [INFO] [stderr] Compiling openssl-sys v0.9.111 [INFO] [stderr] Compiling libsqlite3-sys v0.28.0 [INFO] [stderr] Compiling libssh2-sys v0.3.1 [INFO] [stderr] Compiling tree-sitter-c v0.21.4 [INFO] [stderr] Compiling tree-sitter-rust v0.21.2 [INFO] [stderr] Compiling tree-sitter-java v0.21.0 [INFO] [stderr] Compiling tree-sitter-python v0.21.0 [INFO] [stderr] Compiling libgit2-sys v0.16.2+1.7.2 [INFO] [stderr] Compiling tree-sitter-cpp v0.21.0 [INFO] [stderr] Compiling tree-sitter-typescript v0.21.2 [INFO] [stderr] Compiling tree-sitter-javascript v0.21.4 [INFO] [stderr] Compiling blake3 v1.5.3 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking hashbrown v0.14.5 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.9.2 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking hashlink v0.9.1 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.1 [INFO] [stderr] Compiling zerovec-derive v0.11.2 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling bytemuck_derive v1.10.2 [INFO] [stderr] Checking uuid v1.20.0 [INFO] [stderr] Compiling tracing-attributes v0.1.31 [INFO] [stderr] Compiling clap_derive v4.5.55 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking yoke v0.8.1 [INFO] [stderr] Checking bytemuck v1.25.0 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking zerotrie v0.2.3 [INFO] [stderr] Checking protobuf-support v3.7.2 [INFO] [stderr] Checking zerovec v0.11.5 [INFO] [stderr] Checking tracing v0.1.44 [INFO] [stderr] Checking tracing-subscriber v0.3.22 [INFO] [stderr] Checking tinystr v0.8.2 [INFO] [stderr] Checking icu_locale_core v2.1.1 [INFO] [stderr] Checking potential_utf v0.1.4 [INFO] [stderr] Checking icu_collections v2.1.1 [INFO] [stderr] Checking clap v4.5.56 [INFO] [stderr] Checking icu_provider v2.1.1 [INFO] [stderr] Checking icu_normalizer v2.1.1 [INFO] [stderr] Checking icu_properties v2.1.2 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking bincode v1.3.3 [INFO] [stderr] Checking chrono v0.4.43 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Checking url v2.5.8 [INFO] [stderr] Checking scip v0.6.1 [INFO] [stderr] Checking rusqlite v0.31.0 [INFO] [stderr] Checking git2 v0.18.3 [INFO] [stderr] Checking r2d2_sqlite v0.24.0 [INFO] [stderr] Checking sqlitegraph v2.0.7 [INFO] [stderr] Checking mirage-analyzer v1.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/cli/mod.rs:2330:21 [INFO] [stdout] | [INFO] [stdout] 2330 | uncalled_functions: uncalled_functions, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `uncalled_functions` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `DiGraph` [INFO] [stdout] --> src/cfg/hotpaths.rs:23:23 [INFO] [stdout] | [INFO] [stdout] 23 | use petgraph::graph::{DiGraph, NodeIndex}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashMap` [INFO] [stdout] --> src/cfg/hotpaths.rs:25:24 [INFO] [stdout] | [INFO] [stdout] 25 | use std::collections::{HashMap, HashSet}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `BasicBlock` and `EdgeType` [INFO] [stdout] --> src/cfg/hotpaths.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | BasicBlock, BlockId, Cfg, EdgeType, Path, Terminator, [INFO] [stdout] | ^^^^^^^^^^ ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::storage::CfgBlockData` [INFO] [stdout] --> src/cfg/icfg.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | use crate::storage::CfgBlockData; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/cfg/icfg.rs:287:20 [INFO] [stdout] | [INFO] [stdout] 287 | if depth + 1 <= options.max_depth && !visited.contains(&callee_id) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `depth < options.max_depth` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/cli/mod.rs:2330:21 [INFO] [stdout] | [INFO] [stdout] 2330 | uncalled_functions: uncalled_functions, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `uncalled_functions` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashMap` [INFO] [stdout] --> src/cfg/hotpaths.rs:25:24 [INFO] [stdout] | [INFO] [stdout] 25 | use std::collections::{HashMap, HashSet}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `EdgeType` [INFO] [stdout] --> src/cfg/hotpaths.rs:28:31 [INFO] [stdout] | [INFO] [stdout] 28 | BasicBlock, BlockId, Cfg, EdgeType, Path, Terminator, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::storage::CfgBlockData` [INFO] [stdout] --> src/cfg/icfg.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | use crate::storage::CfgBlockData; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/cfg/icfg.rs:287:20 [INFO] [stdout] | [INFO] [stdout] 287 | if depth + 1 <= options.max_depth && !visited.contains(&callee_id) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `depth < options.max_depth` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::Write` [INFO] [stdout] --> src/storage/sqlite_backend.rs:243:9 [INFO] [stdout] | [INFO] [stdout] 243 | use std::io::Write; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated field `storage::DatabaseStatus::cfg_edges`: Edges are now computed in memory, not stored [INFO] [stdout] --> src/cli/mod.rs:4676:20 [INFO] [stdout] | [INFO] [stdout] 4676 | assert_eq!(status.cfg_edges, 1, "Should have 1 cfg_edge"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated field `storage::DatabaseStatus::cfg_edges`: Edges are now computed in memory, not stored [INFO] [stdout] --> src/cli/mod.rs:4692:17 [INFO] [stdout] | [INFO] [stdout] 4692 | assert!(status.cfg_edges >= 0, "cfg_edges should be non-negative"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated field `storage::DatabaseStatus::cfg_edges`: Edges are now computed in memory, not stored [INFO] [stdout] --> src/cli/mod.rs:4817:20 [INFO] [stdout] | [INFO] [stdout] 4817 | assert_eq!(status.cfg_edges, 0, "Empty database should have 0 cfg_edges"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/cli/mod.rs:3216:13 [INFO] [stdout] | [INFO] [stdout] 3216 | let mut db = match MirageDb::open(&db_path) { [INFO] [stdout] | ----^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `db` [INFO] [stdout] --> src/cli/mod.rs:3216:13 [INFO] [stdout] | [INFO] [stdout] 3216 | let mut db = match MirageDb::open(&db_path) { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_db` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `output_db` [INFO] [stdout] --> src/cli/mod.rs:4241:21 [INFO] [stdout] | [INFO] [stdout] 4241 | let output_db = input_db.clone(); // In-place migration [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_output_db` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `label` [INFO] [stdout] --> src/cfg/icfg.rs:342:13 [INFO] [stdout] | [INFO] [stdout] 342 | let label = format!( [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_label` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's keys [INFO] [stdout] --> src/cli/mod.rs:1849:33 [INFO] [stdout] | [INFO] [stdout] 1849 | for (&scc_id, _) in &scc_members { [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] 1849 - for (&scc_id, _) in &scc_members { [INFO] [stdout] 1849 + for &scc_id in scc_members.keys() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/cli/mod.rs:3216:13 [INFO] [stdout] | [INFO] [stdout] 3216 | let mut db = match MirageDb::open(&db_path) { [INFO] [stdout] | ----^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `db` [INFO] [stdout] --> src/cli/mod.rs:3216:13 [INFO] [stdout] | [INFO] [stdout] 3216 | let mut db = match MirageDb::open(&db_path) { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_db` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/cli/mod.rs:2933:31 [INFO] [stdout] | [INFO] [stdout] 2933 | let show_call_graph = args.call_graph || args.both || (!args.call_graph && !args.function_loops && !args.both); [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] 2933 - let show_call_graph = args.call_graph || args.both || (!args.call_graph && !args.function_loops && !args.both); [INFO] [stdout] 2933 + let show_call_graph = !(!args.call_graph && !args.both && args.function_loops); [INFO] [stdout] | [INFO] [stdout] 2933 - let show_call_graph = args.call_graph || args.both || (!args.call_graph && !args.function_loops && !args.both); [INFO] [stdout] 2933 + let show_call_graph = args.call_graph || args.both || !args.function_loops; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/cli/mod.rs:2934:35 [INFO] [stdout] | [INFO] [stdout] 2934 | let show_function_loops = args.function_loops || args.both || (!args.call_graph && !args.function_loops && !args.both); [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] help: try [INFO] [stdout] | [INFO] [stdout] 2934 - let show_function_loops = args.function_loops || args.both || (!args.call_graph && !args.function_loops && !args.both); [INFO] [stdout] 2934 + let show_function_loops = !(!args.function_loops && !args.both && args.call_graph); [INFO] [stdout] | [INFO] [stdout] 2934 - let show_function_loops = args.function_loops || args.both || (!args.call_graph && !args.function_loops && !args.both); [INFO] [stdout] 2934 + let show_function_loops = args.function_loops || args.both || !args.call_graph; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/cli/mod.rs:3016:21 [INFO] [stdout] | [INFO] [stdout] 3016 | / for row in rows { [INFO] [stdout] 3017 | | if let Ok((function_name, function_id)) = row { [INFO] [stdout] 3018 | | // Load CFG for this function [INFO] [stdout] 3019 | | if let Ok(cfg) = load_cfg_from_db(&db, function_id) { [INFO] [stdout] ... | [INFO] [stdout] 3042 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/cli/mod.rs:3017:25 [INFO] [stdout] | [INFO] [stdout] 3017 | / if let Ok((function_name, function_id)) = row { [INFO] [stdout] 3018 | | // Load CFG for this function [INFO] [stdout] 3019 | | if let Ok(cfg) = load_cfg_from_db(&db, function_id) { [INFO] [stdout] ... | [INFO] [stdout] 3041 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 3016 ~ for (function_name, function_id) in rows.flatten() { [INFO] [stdout] 3017 + // Load CFG for this function [INFO] [stdout] 3018 + if let Ok(cfg) = load_cfg_from_db(&db, function_id) { [INFO] [stdout] 3019 + // Detect natural loops [INFO] [stdout] 3020 + let natural_loops = detect_natural_loops(&cfg); [INFO] [stdout] 3021 + [INFO] [stdout] 3022 + if !natural_loops.is_empty() { [INFO] [stdout] 3023 + let loop_infos: Vec = natural_loops.iter().map(|loop_| { [INFO] [stdout] 3024 + let nesting_level = loop_.nesting_level(&natural_loops); [INFO] [stdout] 3025 + let body_blocks: Vec = loop_.body.iter() [INFO] [stdout] 3026 + .map(|&node| cfg[node].id) [INFO] [stdout] 3027 + .collect(); [INFO] [stdout] 3028 + LoopInfo { [INFO] [stdout] 3029 + header: cfg[loop_.header].id, [INFO] [stdout] 3030 + back_edge_from: cfg[loop_.back_edge.0].id, [INFO] [stdout] 3031 + body_size: loop_.size(), [INFO] [stdout] 3032 + nesting_level, [INFO] [stdout] 3033 + body_blocks, [INFO] [stdout] 3034 + } [INFO] [stdout] 3035 + }).collect(); [INFO] [stdout] 3036 + [INFO] [stdout] 3037 + function_loops_map.insert(function_name, loop_infos); [INFO] [stdout] 3038 + } [INFO] [stdout] 3039 + } [INFO] [stdout] 3040 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `output_db` [INFO] [stdout] --> src/cli/mod.rs:4241:21 [INFO] [stdout] | [INFO] [stdout] 4241 | let output_db = input_db.clone(); // In-place migration [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_output_db` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Iterator::find` [INFO] [stdout] --> src/cfg/ast.rs:250:9 [INFO] [stdout] | [INFO] [stdout] 250 | / for child in block.children(&mut cursor) { [INFO] [stdout] 251 | | if self.is_statement(child) { [INFO] [stdout] 252 | | return Some(child); [INFO] [stdout] ... | [INFO] [stdout] 255 | | None [INFO] [stdout] | |____________^ help: replace with an iterator: `block.children(&mut cursor).find(|&child| self.is_statement(child))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find [INFO] [stdout] = note: `#[warn(clippy::manual_find)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/diff.rs:342:17 [INFO] [stdout] | [INFO] [stdout] 342 | / if idx + 1 < block_ids.len() { [INFO] [stdout] 343 | | edges.push(EdgeDiff { [INFO] [stdout] 344 | | from_block: block_id, [INFO] [stdout] 345 | | to_block: block_ids[idx + 1], [INFO] [stdout] 346 | | edge_type: "fallthrough".to_string(), [INFO] [stdout] 347 | | }); [INFO] [stdout] 348 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 340 ~ "fallthrough" | "goto" [INFO] [stdout] 341 | // Edge to next block [INFO] [stdout] 342 ~ if idx + 1 < block_ids.len() => { [INFO] [stdout] 343 | edges.push(EdgeDiff { [INFO] [stdout] ... [INFO] [stdout] 347 | }); [INFO] [stdout] 348 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/diff.rs:372:17 [INFO] [stdout] | [INFO] [stdout] 372 | / if idx + 1 < block_ids.len() { [INFO] [stdout] 373 | | edges.push(EdgeDiff { [INFO] [stdout] 374 | | from_block: block_id, [INFO] [stdout] 375 | | to_block: block_ids[idx + 1], [INFO] [stdout] 376 | | edge_type: "call".to_string(), [INFO] [stdout] 377 | | }); [INFO] [stdout] 378 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 370 ~ "call" [INFO] [stdout] 371 | // Edge to next block (return path) [INFO] [stdout] 372 ~ if idx + 1 < block_ids.len() => { [INFO] [stdout] 373 | edges.push(EdgeDiff { [INFO] [stdout] ... [INFO] [stdout] 377 | }); [INFO] [stdout] 378 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/diff.rs:419:17 [INFO] [stdout] | [INFO] [stdout] 419 | / if idx + 1 < blocks.len() { [INFO] [stdout] 420 | | let to_idx = node_indices[&((idx + 1) as i64)]; [INFO] [stdout] 421 | | graph.add_edge(from_idx, to_idx, ()); [INFO] [stdout] 422 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 418 ~ "fallthrough" | "goto" [INFO] [stdout] 419 ~ if idx + 1 < blocks.len() => { [INFO] [stdout] 420 | let to_idx = node_indices[&((idx + 1) as i64)]; [INFO] [stdout] 421 | graph.add_edge(from_idx, to_idx, ()); [INFO] [stdout] 422 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/diff.rs:435:17 [INFO] [stdout] | [INFO] [stdout] 435 | / if idx + 1 < blocks.len() { [INFO] [stdout] 436 | | let to_idx = node_indices[&((idx + 1) as i64)]; [INFO] [stdout] 437 | | graph.add_edge(from_idx, to_idx, ()); [INFO] [stdout] 438 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 434 ~ "call" [INFO] [stdout] 435 ~ if idx + 1 < blocks.len() => { [INFO] [stdout] 436 | let to_idx = node_indices[&((idx + 1) as i64)]; [INFO] [stdout] 437 | graph.add_edge(from_idx, to_idx, ()); [INFO] [stdout] 438 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Iterator::find` [INFO] [stdout] --> src/cfg/dominators.rs:210:9 [INFO] [stdout] | [INFO] [stdout] 210 | / for dom in self.dominators(b) { [INFO] [stdout] 211 | | if a_doms.contains(&dom) { [INFO] [stdout] 212 | | return Some(dom); [INFO] [stdout] ... | [INFO] [stdout] 216 | | None [INFO] [stdout] | |____________^ help: replace with an iterator: `self.dominators(b).find(|&dom| a_doms.contains(&dom))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/cfg/export.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | dot.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `dot.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/cfg/git_utils.rs:70:20 [INFO] [stdout] | [INFO] [stdout] 70 | if new_file.extension().map_or(false, |e| e == "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] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 70 - if new_file.extension().map_or(false, |e| e == "rs") { [INFO] [stdout] 70 + if new_file.extension().is_some_and(|e| e == "rs") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/cfg/git_utils.rs:130:20 [INFO] [stdout] | [INFO] [stdout] 130 | && entity.data.get("kind") [INFO] [stdout] | ____________________^ [INFO] [stdout] 131 | | .and_then(|v| v.as_str()) [INFO] [stdout] 132 | | .map_or(false, |k| k == "Function"); [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 a standard comparison instead [INFO] [stdout] | [INFO] [stdout] 130 ~ && (entity.data.get("kind") [INFO] [stdout] 131 ~ .and_then(|v| v.as_str()) == Some("Function")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/icfg.rs:222:21 [INFO] [stdout] | [INFO] [stdout] 222 | / if idx + 1 < blocks.len() { [INFO] [stdout] 223 | | let to_idx = icfg.node_map[&(function_id, blocks[idx + 1].id)]; [INFO] [stdout] 224 | | icfg.graph.add_edge(from_idx, to_idx, IcfgEdge::IntraProcedural { [INFO] [stdout] 225 | | edge_type: "fallthrough".to_string(), [INFO] [stdout] 226 | | }); [INFO] [stdout] 227 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 221 ~ "fallthrough" | "goto" | "call" [INFO] [stdout] 222 ~ if idx + 1 < blocks.len() => { [INFO] [stdout] 223 | let to_idx = icfg.node_map[&(function_id, blocks[idx + 1].id)]; [INFO] [stdout] ... [INFO] [stdout] 226 | }); [INFO] [stdout] 227 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `label` [INFO] [stdout] --> src/cfg/icfg.rs:342:13 [INFO] [stdout] | [INFO] [stdout] 342 | let label = format!( [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_label` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/cfg/paths.rs:826:1 [INFO] [stdout] | [INFO] [stdout] 826 | / fn dfs_enumerate_with_context( [INFO] [stdout] 827 | | cfg: &Cfg, [INFO] [stdout] 828 | | current: NodeIndex, [INFO] [stdout] 829 | | limits: &PathLimits, [INFO] [stdout] ... | [INFO] [stdout] 834 | | loop_iterations: &mut HashMap, [INFO] [stdout] 835 | | ) { [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: this function has too many arguments (10/7) [INFO] [stdout] --> src/cfg/paths.rs:998:1 [INFO] [stdout] | [INFO] [stdout] 998 | / fn dfs_enumerate( [INFO] [stdout] 999 | | cfg: &Cfg, [INFO] [stdout] 1000 | | current: NodeIndex, [INFO] [stdout] 1001 | | exits: &HashSet, [INFO] [stdout] ... | [INFO] [stdout] 1008 | | reachable_blocks: &HashSet, [INFO] [stdout] 1009 | | ) { [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 `map_or` can be simplified [INFO] [stdout] --> src/cfg/patterns.rs:321:20 [INFO] [stdout] | [INFO] [stdout] 321 | .find(|&n| cfg.node_weight(n).map_or(false, |b| b.id == id)) [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] 321 - .find(|&n| cfg.node_weight(n).map_or(false, |b| b.id == id)) [INFO] [stdout] 321 + .find(|&n| cfg.node_weight(n).is_some_and(|b| b.id == id)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Iterator::find` [INFO] [stdout] --> src/cfg/post_dominators.rs:173:9 [INFO] [stdout] | [INFO] [stdout] 173 | / for pdom in self.post_dominators(b) { [INFO] [stdout] 174 | | if a_pdoms.contains(&pdom) { [INFO] [stdout] 175 | | return Some(pdom); [INFO] [stdout] ... | [INFO] [stdout] 179 | | None [INFO] [stdout] | |____________^ help: replace with an iterator: `self.post_dominators(b).find(|&pdom| a_pdoms.contains(&pdom))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/cfg/summary.rs:80:25 [INFO] [stdout] | [INFO] [stdout] 80 | (kind, true) => format!("{}", kind), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `kind.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/cfg/mod.rs:88:13 [INFO] [stdout] | [INFO] [stdout] 88 | blocks: &[(i64, String, Option, Option, Option, [INFO] [stdout] | _____________^ [INFO] [stdout] 89 | | Option, Option, Option, Option)], [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: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/mod.rs:101:17 [INFO] [stdout] | [INFO] [stdout] 101 | / if idx + 1 < blocks.len() { [INFO] [stdout] 102 | | graph.add_edge( [INFO] [stdout] 103 | | NodeIndex::new(idx), [INFO] [stdout] 104 | | NodeIndex::new(idx + 1), [INFO] [stdout] 105 | | EdgeType::Fallthrough, [INFO] [stdout] 106 | | ); [INFO] [stdout] 107 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 99 ~ "fallthrough" [INFO] [stdout] 100 | // Edge to next sequential block [INFO] [stdout] 101 ~ if idx + 1 < blocks.len() => { [INFO] [stdout] 102 | graph.add_edge( [INFO] [stdout] ... [INFO] [stdout] 106 | ); [INFO] [stdout] 107 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/mod.rs:130:17 [INFO] [stdout] | [INFO] [stdout] 130 | / if idx + 1 < blocks.len() { [INFO] [stdout] 131 | | graph.add_edge( [INFO] [stdout] 132 | | NodeIndex::new(idx), [INFO] [stdout] 133 | | NodeIndex::new(idx + 1), [INFO] [stdout] 134 | | EdgeType::Fallthrough, [INFO] [stdout] 135 | | ); [INFO] [stdout] 136 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 127 ~ "goto" [INFO] [stdout] 128 | // Find target by analyzing control flow structure [INFO] [stdout] 129 | // For now, fallthrough to next (will be refined with proper target resolution) [INFO] [stdout] 130 ~ if idx + 1 < blocks.len() => { [INFO] [stdout] 131 | graph.add_edge( [INFO] [stdout] ... [INFO] [stdout] 135 | ); [INFO] [stdout] 136 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/mod.rs:147:17 [INFO] [stdout] | [INFO] [stdout] 147 | / if idx + 1 < blocks.len() { [INFO] [stdout] 148 | | graph.add_edge( [INFO] [stdout] 149 | | NodeIndex::new(idx), [INFO] [stdout] 150 | | NodeIndex::new(idx + 1), [INFO] [stdout] 151 | | EdgeType::Call, [INFO] [stdout] 152 | | ); [INFO] [stdout] 153 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 145 ~ "call" [INFO] [stdout] 146 | // Function call - edge to next block (normal return path) [INFO] [stdout] 147 ~ if idx + 1 < blocks.len() => { [INFO] [stdout] 148 | graph.add_edge( [INFO] [stdout] ... [INFO] [stdout] 152 | ); [INFO] [stdout] 153 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/storage/mod.rs:210:17 [INFO] [stdout] | [INFO] [stdout] 210 | return SqliteStorage::open(db_path).map(Backend::Sqlite); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 210 - return SqliteStorage::open(db_path).map(Backend::Sqlite); [INFO] [stdout] 210 + SqliteStorage::open(db_path).map(Backend::Sqlite) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/storage/mod.rs:212:17 [INFO] [stdout] | [INFO] [stdout] 212 | return Err(anyhow::anyhow!("Native-V3 backend detected but SQLite feature enabled")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 212 - return Err(anyhow::anyhow!("Native-V3 backend detected but SQLite feature enabled")); [INFO] [stdout] 212 + Err(anyhow::anyhow!("Native-V3 backend detected but SQLite feature enabled")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/storage/mod.rs:1049:25 [INFO] [stdout] | [INFO] [stdout] 1049 | let block_rows: Vec<(i64, String, Option, Option, Option, [INFO] [stdout] | _________________________^ [INFO] [stdout] 1050 | | Option, Option, Option, Option)> = blocks [INFO] [stdout] | |__________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/storage/mod.rs:1145:9 [INFO] [stdout] | [INFO] [stdout] 1145 | / self.conn() [INFO] [stdout] 1146 | | .and_then(|conn| Ok(function_exists(conn, function_id))) [INFO] [stdout] | |____________________________________________________________________^ help: try: `self.conn().map(|conn| function_exists(conn, function_id))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/storage/mod.rs:1178:9 [INFO] [stdout] | [INFO] [stdout] 1178 | / self.conn() [INFO] [stdout] 1179 | | .and_then(|conn| Ok(get_function_hash(conn, function_id))) [INFO] [stdout] | |______________________________________________________________________^ help: try: `self.conn().map(|conn| get_function_hash(conn, function_id))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/storage/mod.rs:1274:21 [INFO] [stdout] | [INFO] [stdout] 1274 | let block_rows: Vec<(i64, String, Option, Option, Option, [INFO] [stdout] | _____________________^ [INFO] [stdout] 1275 | | Option, Option, Option, Option)> = stmt [INFO] [stdout] | |______________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/storage/mod.rs:1325:17 [INFO] [stdout] | [INFO] [stdout] 1325 | block_rows: Vec<(i64, String, Option, Option, Option, [INFO] [stdout] | _________________^ [INFO] [stdout] 1326 | | Option, Option, Option, Option)>, [INFO] [stdout] | |_________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/storage/mod.rs:1969:13 [INFO] [stdout] | [INFO] [stdout] 1969 | / for row in rows { [INFO] [stdout] 1970 | | if let Ok(func_name) = row { [INFO] [stdout] 1971 | | changed.insert(func_name); [INFO] [stdout] 1972 | | } [INFO] [stdout] 1973 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/storage/mod.rs:1970:17 [INFO] [stdout] | [INFO] [stdout] 1970 | / if let Ok(func_name) = row { [INFO] [stdout] 1971 | | changed.insert(func_name); [INFO] [stdout] 1972 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1969 ~ for func_name in rows.flatten() { [INFO] [stdout] 1970 + changed.insert(func_name); [INFO] [stdout] 1971 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> tests/integration_test.rs:76:13 [INFO] [stdout] | [INFO] [stdout] 76 | let mut conn = Connection::open(db_path).unwrap(); [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's keys [INFO] [stdout] --> src/cli/mod.rs:1849:33 [INFO] [stdout] | [INFO] [stdout] 1849 | for (&scc_id, _) in &scc_members { [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] 1849 - for (&scc_id, _) in &scc_members { [INFO] [stdout] 1849 + for &scc_id in scc_members.keys() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/cli/mod.rs:2933:31 [INFO] [stdout] | [INFO] [stdout] 2933 | let show_call_graph = args.call_graph || args.both || (!args.call_graph && !args.function_loops && !args.both); [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] 2933 - let show_call_graph = args.call_graph || args.both || (!args.call_graph && !args.function_loops && !args.both); [INFO] [stdout] 2933 + let show_call_graph = !(!args.call_graph && !args.both && args.function_loops); [INFO] [stdout] | [INFO] [stdout] 2933 - let show_call_graph = args.call_graph || args.both || (!args.call_graph && !args.function_loops && !args.both); [INFO] [stdout] 2933 + let show_call_graph = args.call_graph || args.both || !args.function_loops; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/cli/mod.rs:2934:35 [INFO] [stdout] | [INFO] [stdout] 2934 | let show_function_loops = args.function_loops || args.both || (!args.call_graph && !args.function_loops && !args.both); [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] help: try [INFO] [stdout] | [INFO] [stdout] 2934 - let show_function_loops = args.function_loops || args.both || (!args.call_graph && !args.function_loops && !args.both); [INFO] [stdout] 2934 + let show_function_loops = !(!args.function_loops && !args.both && args.call_graph); [INFO] [stdout] | [INFO] [stdout] 2934 - let show_function_loops = args.function_loops || args.both || (!args.call_graph && !args.function_loops && !args.both); [INFO] [stdout] 2934 + let show_function_loops = args.function_loops || args.both || !args.call_graph; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/cli/mod.rs:3016:21 [INFO] [stdout] | [INFO] [stdout] 3016 | / for row in rows { [INFO] [stdout] 3017 | | if let Ok((function_name, function_id)) = row { [INFO] [stdout] 3018 | | // Load CFG for this function [INFO] [stdout] 3019 | | if let Ok(cfg) = load_cfg_from_db(&db, function_id) { [INFO] [stdout] ... | [INFO] [stdout] 3042 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/cli/mod.rs:3017:25 [INFO] [stdout] | [INFO] [stdout] 3017 | / if let Ok((function_name, function_id)) = row { [INFO] [stdout] 3018 | | // Load CFG for this function [INFO] [stdout] 3019 | | if let Ok(cfg) = load_cfg_from_db(&db, function_id) { [INFO] [stdout] ... | [INFO] [stdout] 3041 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 3016 ~ for (function_name, function_id) in rows.flatten() { [INFO] [stdout] 3017 + // Load CFG for this function [INFO] [stdout] 3018 + if let Ok(cfg) = load_cfg_from_db(&db, function_id) { [INFO] [stdout] 3019 + // Detect natural loops [INFO] [stdout] 3020 + let natural_loops = detect_natural_loops(&cfg); [INFO] [stdout] 3021 + [INFO] [stdout] 3022 + if !natural_loops.is_empty() { [INFO] [stdout] 3023 + let loop_infos: Vec = natural_loops.iter().map(|loop_| { [INFO] [stdout] 3024 + let nesting_level = loop_.nesting_level(&natural_loops); [INFO] [stdout] 3025 + let body_blocks: Vec = loop_.body.iter() [INFO] [stdout] 3026 + .map(|&node| cfg[node].id) [INFO] [stdout] 3027 + .collect(); [INFO] [stdout] 3028 + LoopInfo { [INFO] [stdout] 3029 + header: cfg[loop_.header].id, [INFO] [stdout] 3030 + back_edge_from: cfg[loop_.back_edge.0].id, [INFO] [stdout] 3031 + body_size: loop_.size(), [INFO] [stdout] 3032 + nesting_level, [INFO] [stdout] 3033 + body_blocks, [INFO] [stdout] 3034 + } [INFO] [stdout] 3035 + }).collect(); [INFO] [stdout] 3036 + [INFO] [stdout] 3037 + function_loops_map.insert(function_name, loop_infos); [INFO] [stdout] 3038 + } [INFO] [stdout] 3039 + } [INFO] [stdout] 3040 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/cli/mod.rs:2330:21 [INFO] [stdout] | [INFO] [stdout] 2330 | uncalled_functions: uncalled_functions, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `uncalled_functions` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `DiGraph` [INFO] [stdout] --> src/cfg/hotpaths.rs:23:23 [INFO] [stdout] | [INFO] [stdout] 23 | use petgraph::graph::{DiGraph, NodeIndex}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashMap` [INFO] [stdout] --> src/cfg/hotpaths.rs:25:24 [INFO] [stdout] | [INFO] [stdout] 25 | use std::collections::{HashMap, HashSet}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `BasicBlock` and `EdgeType` [INFO] [stdout] --> src/cfg/hotpaths.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | BasicBlock, BlockId, Cfg, EdgeType, Path, Terminator, [INFO] [stdout] | ^^^^^^^^^^ ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::storage::CfgBlockData` [INFO] [stdout] --> src/cfg/icfg.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | use crate::storage::CfgBlockData; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/cfg/icfg.rs:287:20 [INFO] [stdout] | [INFO] [stdout] 287 | if depth + 1 <= options.max_depth && !visited.contains(&callee_id) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `depth < options.max_depth` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `HotPath`, `HotpathsOptions`, and `compute_hot_paths` [INFO] [stdout] --> src/cfg/mod.rs:31:20 [INFO] [stdout] | [INFO] [stdout] 31 | pub use hotpaths::{compute_hot_paths, HotPath, HotpathsOptions}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/cli/mod.rs:2330:21 [INFO] [stdout] | [INFO] [stdout] 2330 | uncalled_functions: uncalled_functions, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `uncalled_functions` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashMap` [INFO] [stdout] --> src/cfg/hotpaths.rs:25:24 [INFO] [stdout] | [INFO] [stdout] 25 | use std::collections::{HashMap, HashSet}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `EdgeType` [INFO] [stdout] --> src/cfg/hotpaths.rs:28:31 [INFO] [stdout] | [INFO] [stdout] 28 | BasicBlock, BlockId, Cfg, EdgeType, Path, Terminator, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::storage::CfgBlockData` [INFO] [stdout] --> src/cfg/icfg.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | use crate::storage::CfgBlockData; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/cfg/icfg.rs:287:20 [INFO] [stdout] | [INFO] [stdout] 287 | if depth + 1 <= options.max_depth && !visited.contains(&callee_id) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `depth < options.max_depth` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `true` [INFO] [stdout] --> src/cli/mod.rs:6835:37 [INFO] [stdout] | [INFO] [stdout] 6835 | CfgFormat::Human => assert!(true), [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] = note: `#[warn(clippy::assertions_on_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `true` [INFO] [stdout] --> src/cli/mod.rs:6836:35 [INFO] [stdout] | [INFO] [stdout] 6836 | CfgFormat::Dot => assert!(true), [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `true` [INFO] [stdout] --> src/cli/mod.rs:6837:36 [INFO] [stdout] | [INFO] [stdout] 6837 | CfgFormat::Json => assert!(true), [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `HotPath`, `HotpathsOptions`, and `compute_hot_paths` [INFO] [stdout] --> src/cfg/mod.rs:31:20 [INFO] [stdout] | [INFO] [stdout] 31 | pub use hotpaths::{compute_hot_paths, HotPath, HotpathsOptions}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::Write` [INFO] [stdout] --> src/storage/sqlite_backend.rs:243:9 [INFO] [stdout] | [INFO] [stdout] 243 | use std::io::Write; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Iterator::find` [INFO] [stdout] --> src/cfg/ast.rs:250:9 [INFO] [stdout] | [INFO] [stdout] 250 | / for child in block.children(&mut cursor) { [INFO] [stdout] 251 | | if self.is_statement(child) { [INFO] [stdout] 252 | | return Some(child); [INFO] [stdout] ... | [INFO] [stdout] 255 | | None [INFO] [stdout] | |____________^ help: replace with an iterator: `block.children(&mut cursor).find(|&child| self.is_statement(child))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find [INFO] [stdout] = note: `#[warn(clippy::manual_find)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/diff.rs:342:17 [INFO] [stdout] | [INFO] [stdout] 342 | / if idx + 1 < block_ids.len() { [INFO] [stdout] 343 | | edges.push(EdgeDiff { [INFO] [stdout] 344 | | from_block: block_id, [INFO] [stdout] 345 | | to_block: block_ids[idx + 1], [INFO] [stdout] 346 | | edge_type: "fallthrough".to_string(), [INFO] [stdout] 347 | | }); [INFO] [stdout] 348 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 340 ~ "fallthrough" | "goto" [INFO] [stdout] 341 | // Edge to next block [INFO] [stdout] 342 ~ if idx + 1 < block_ids.len() => { [INFO] [stdout] 343 | edges.push(EdgeDiff { [INFO] [stdout] ... [INFO] [stdout] 347 | }); [INFO] [stdout] 348 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/diff.rs:372:17 [INFO] [stdout] | [INFO] [stdout] 372 | / if idx + 1 < block_ids.len() { [INFO] [stdout] 373 | | edges.push(EdgeDiff { [INFO] [stdout] 374 | | from_block: block_id, [INFO] [stdout] 375 | | to_block: block_ids[idx + 1], [INFO] [stdout] 376 | | edge_type: "call".to_string(), [INFO] [stdout] 377 | | }); [INFO] [stdout] 378 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 370 ~ "call" [INFO] [stdout] 371 | // Edge to next block (return path) [INFO] [stdout] 372 ~ if idx + 1 < block_ids.len() => { [INFO] [stdout] 373 | edges.push(EdgeDiff { [INFO] [stdout] ... [INFO] [stdout] 377 | }); [INFO] [stdout] 378 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/diff.rs:419:17 [INFO] [stdout] | [INFO] [stdout] 419 | / if idx + 1 < blocks.len() { [INFO] [stdout] 420 | | let to_idx = node_indices[&((idx + 1) as i64)]; [INFO] [stdout] 421 | | graph.add_edge(from_idx, to_idx, ()); [INFO] [stdout] 422 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 418 ~ "fallthrough" | "goto" [INFO] [stdout] 419 ~ if idx + 1 < blocks.len() => { [INFO] [stdout] 420 | let to_idx = node_indices[&((idx + 1) as i64)]; [INFO] [stdout] 421 | graph.add_edge(from_idx, to_idx, ()); [INFO] [stdout] 422 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/diff.rs:435:17 [INFO] [stdout] | [INFO] [stdout] 435 | / if idx + 1 < blocks.len() { [INFO] [stdout] 436 | | let to_idx = node_indices[&((idx + 1) as i64)]; [INFO] [stdout] 437 | | graph.add_edge(from_idx, to_idx, ()); [INFO] [stdout] 438 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 434 ~ "call" [INFO] [stdout] 435 ~ if idx + 1 < blocks.len() => { [INFO] [stdout] 436 | let to_idx = node_indices[&((idx + 1) as i64)]; [INFO] [stdout] 437 | graph.add_edge(from_idx, to_idx, ()); [INFO] [stdout] 438 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Iterator::find` [INFO] [stdout] --> src/cfg/dominators.rs:210:9 [INFO] [stdout] | [INFO] [stdout] 210 | / for dom in self.dominators(b) { [INFO] [stdout] 211 | | if a_doms.contains(&dom) { [INFO] [stdout] 212 | | return Some(dom); [INFO] [stdout] ... | [INFO] [stdout] 216 | | None [INFO] [stdout] | |____________^ help: replace with an iterator: `self.dominators(b).find(|&dom| a_doms.contains(&dom))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/cfg/export.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | dot.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `dot.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/cfg/git_utils.rs:70:20 [INFO] [stdout] | [INFO] [stdout] 70 | if new_file.extension().map_or(false, |e| e == "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] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 70 - if new_file.extension().map_or(false, |e| e == "rs") { [INFO] [stdout] 70 + if new_file.extension().is_some_and(|e| e == "rs") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/cfg/git_utils.rs:130:20 [INFO] [stdout] | [INFO] [stdout] 130 | && entity.data.get("kind") [INFO] [stdout] | ____________________^ [INFO] [stdout] 131 | | .and_then(|v| v.as_str()) [INFO] [stdout] 132 | | .map_or(false, |k| k == "Function"); [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 a standard comparison instead [INFO] [stdout] | [INFO] [stdout] 130 ~ && (entity.data.get("kind") [INFO] [stdout] 131 ~ .and_then(|v| v.as_str()) == Some("Function")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/icfg.rs:222:21 [INFO] [stdout] | [INFO] [stdout] 222 | / if idx + 1 < blocks.len() { [INFO] [stdout] 223 | | let to_idx = icfg.node_map[&(function_id, blocks[idx + 1].id)]; [INFO] [stdout] 224 | | icfg.graph.add_edge(from_idx, to_idx, IcfgEdge::IntraProcedural { [INFO] [stdout] 225 | | edge_type: "fallthrough".to_string(), [INFO] [stdout] 226 | | }); [INFO] [stdout] 227 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 221 ~ "fallthrough" | "goto" | "call" [INFO] [stdout] 222 ~ if idx + 1 < blocks.len() => { [INFO] [stdout] 223 | let to_idx = icfg.node_map[&(function_id, blocks[idx + 1].id)]; [INFO] [stdout] ... [INFO] [stdout] 226 | }); [INFO] [stdout] 227 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/cfg/paths.rs:826:1 [INFO] [stdout] | [INFO] [stdout] 826 | / fn dfs_enumerate_with_context( [INFO] [stdout] 827 | | cfg: &Cfg, [INFO] [stdout] 828 | | current: NodeIndex, [INFO] [stdout] 829 | | limits: &PathLimits, [INFO] [stdout] ... | [INFO] [stdout] 834 | | loop_iterations: &mut HashMap, [INFO] [stdout] 835 | | ) { [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: this function has too many arguments (10/7) [INFO] [stdout] --> src/cfg/paths.rs:998:1 [INFO] [stdout] | [INFO] [stdout] 998 | / fn dfs_enumerate( [INFO] [stdout] 999 | | cfg: &Cfg, [INFO] [stdout] 1000 | | current: NodeIndex, [INFO] [stdout] 1001 | | exits: &HashSet, [INFO] [stdout] ... | [INFO] [stdout] 1008 | | reachable_blocks: &HashSet, [INFO] [stdout] 1009 | | ) { [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: length comparison to zero [INFO] [stdout] --> src/cfg/paths.rs:2891:17 [INFO] [stdout] | [INFO] [stdout] 2891 | assert!(paths.len() > 0, "Should have at least some paths"); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!paths.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/cfg/paths.rs:2982:17 [INFO] [stdout] | [INFO] [stdout] 2982 | assert!(paths.len() > 0, "Should have some paths"); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!paths.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/cfg/paths.rs:3905:17 [INFO] [stdout] | [INFO] [stdout] 3905 | assert!(paths.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!paths.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/cfg/paths.rs:4462:17 [INFO] [stdout] | [INFO] [stdout] 4462 | assert!(paths.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!paths.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/cfg/paths.rs:4480:17 [INFO] [stdout] | [INFO] [stdout] 4480 | assert!(paths.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!paths.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/cfg/paths.rs:4548:17 [INFO] [stdout] | [INFO] [stdout] 4548 | assert!(paths.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!paths.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/cfg/patterns.rs:321:20 [INFO] [stdout] | [INFO] [stdout] 321 | .find(|&n| cfg.node_weight(n).map_or(false, |b| b.id == id)) [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] 321 - .find(|&n| cfg.node_weight(n).map_or(false, |b| b.id == id)) [INFO] [stdout] 321 + .find(|&n| cfg.node_weight(n).is_some_and(|b| b.id == id)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Iterator::find` [INFO] [stdout] --> src/cfg/post_dominators.rs:173:9 [INFO] [stdout] | [INFO] [stdout] 173 | / for pdom in self.post_dominators(b) { [INFO] [stdout] 174 | | if a_pdoms.contains(&pdom) { [INFO] [stdout] 175 | | return Some(pdom); [INFO] [stdout] ... | [INFO] [stdout] 179 | | None [INFO] [stdout] | |____________^ help: replace with an iterator: `self.post_dominators(b).find(|&pdom| a_pdoms.contains(&pdom))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/cfg/summary.rs:80:25 [INFO] [stdout] | [INFO] [stdout] 80 | (kind, true) => format!("{}", kind), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `kind.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/cfg/mod.rs:88:13 [INFO] [stdout] | [INFO] [stdout] 88 | blocks: &[(i64, String, Option, Option, Option, [INFO] [stdout] | _____________^ [INFO] [stdout] 89 | | Option, Option, Option, Option)], [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: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/mod.rs:101:17 [INFO] [stdout] | [INFO] [stdout] 101 | / if idx + 1 < blocks.len() { [INFO] [stdout] 102 | | graph.add_edge( [INFO] [stdout] 103 | | NodeIndex::new(idx), [INFO] [stdout] 104 | | NodeIndex::new(idx + 1), [INFO] [stdout] 105 | | EdgeType::Fallthrough, [INFO] [stdout] 106 | | ); [INFO] [stdout] 107 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 99 ~ "fallthrough" [INFO] [stdout] 100 | // Edge to next sequential block [INFO] [stdout] 101 ~ if idx + 1 < blocks.len() => { [INFO] [stdout] 102 | graph.add_edge( [INFO] [stdout] ... [INFO] [stdout] 106 | ); [INFO] [stdout] 107 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/mod.rs:130:17 [INFO] [stdout] | [INFO] [stdout] 130 | / if idx + 1 < blocks.len() { [INFO] [stdout] 131 | | graph.add_edge( [INFO] [stdout] 132 | | NodeIndex::new(idx), [INFO] [stdout] 133 | | NodeIndex::new(idx + 1), [INFO] [stdout] 134 | | EdgeType::Fallthrough, [INFO] [stdout] 135 | | ); [INFO] [stdout] 136 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 127 ~ "goto" [INFO] [stdout] 128 | // Find target by analyzing control flow structure [INFO] [stdout] 129 | // For now, fallthrough to next (will be refined with proper target resolution) [INFO] [stdout] 130 ~ if idx + 1 < blocks.len() => { [INFO] [stdout] 131 | graph.add_edge( [INFO] [stdout] ... [INFO] [stdout] 135 | ); [INFO] [stdout] 136 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/mod.rs:147:17 [INFO] [stdout] | [INFO] [stdout] 147 | / if idx + 1 < blocks.len() { [INFO] [stdout] 148 | | graph.add_edge( [INFO] [stdout] 149 | | NodeIndex::new(idx), [INFO] [stdout] 150 | | NodeIndex::new(idx + 1), [INFO] [stdout] 151 | | EdgeType::Call, [INFO] [stdout] 152 | | ); [INFO] [stdout] 153 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 145 ~ "call" [INFO] [stdout] 146 | // Function call - edge to next block (normal return path) [INFO] [stdout] 147 ~ if idx + 1 < blocks.len() => { [INFO] [stdout] 148 | graph.add_edge( [INFO] [stdout] ... [INFO] [stdout] 152 | ); [INFO] [stdout] 153 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated field `storage::DatabaseStatus::cfg_edges`: Edges are now computed in memory, not stored [INFO] [stdout] --> src/cli/mod.rs:4676:20 [INFO] [stdout] | [INFO] [stdout] 4676 | assert_eq!(status.cfg_edges, 1, "Should have 1 cfg_edge"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated field `storage::DatabaseStatus::cfg_edges`: Edges are now computed in memory, not stored [INFO] [stdout] --> src/cli/mod.rs:4692:17 [INFO] [stdout] | [INFO] [stdout] 4692 | assert!(status.cfg_edges >= 0, "cfg_edges should be non-negative"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated field `storage::DatabaseStatus::cfg_edges`: Edges are now computed in memory, not stored [INFO] [stdout] --> src/cli/mod.rs:4817:20 [INFO] [stdout] | [INFO] [stdout] 4817 | assert_eq!(status.cfg_edges, 0, "Empty database should have 0 cfg_edges"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/storage/mod.rs:210:17 [INFO] [stdout] | [INFO] [stdout] 210 | return SqliteStorage::open(db_path).map(Backend::Sqlite); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 210 - return SqliteStorage::open(db_path).map(Backend::Sqlite); [INFO] [stdout] 210 + SqliteStorage::open(db_path).map(Backend::Sqlite) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/storage/mod.rs:212:17 [INFO] [stdout] | [INFO] [stdout] 212 | return Err(anyhow::anyhow!("Native-V3 backend detected but SQLite feature enabled")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 212 - return Err(anyhow::anyhow!("Native-V3 backend detected but SQLite feature enabled")); [INFO] [stdout] 212 + Err(anyhow::anyhow!("Native-V3 backend detected but SQLite feature enabled")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/storage/mod.rs:1049:25 [INFO] [stdout] | [INFO] [stdout] 1049 | let block_rows: Vec<(i64, String, Option, Option, Option, [INFO] [stdout] | _________________________^ [INFO] [stdout] 1050 | | Option, Option, Option, Option)> = blocks [INFO] [stdout] | |__________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/storage/mod.rs:1145:9 [INFO] [stdout] | [INFO] [stdout] 1145 | / self.conn() [INFO] [stdout] 1146 | | .and_then(|conn| Ok(function_exists(conn, function_id))) [INFO] [stdout] | |____________________________________________________________________^ help: try: `self.conn().map(|conn| function_exists(conn, function_id))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/storage/mod.rs:1178:9 [INFO] [stdout] | [INFO] [stdout] 1178 | / self.conn() [INFO] [stdout] 1179 | | .and_then(|conn| Ok(get_function_hash(conn, function_id))) [INFO] [stdout] | |______________________________________________________________________^ help: try: `self.conn().map(|conn| get_function_hash(conn, function_id))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/storage/mod.rs:1274:21 [INFO] [stdout] | [INFO] [stdout] 1274 | let block_rows: Vec<(i64, String, Option, Option, Option, [INFO] [stdout] | _____________________^ [INFO] [stdout] 1275 | | Option, Option, Option, Option)> = stmt [INFO] [stdout] | |______________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/storage/mod.rs:1325:17 [INFO] [stdout] | [INFO] [stdout] 1325 | block_rows: Vec<(i64, String, Option, Option, Option, [INFO] [stdout] | _________________^ [INFO] [stdout] 1326 | | Option, Option, Option, Option)>, [INFO] [stdout] | |_________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/storage/mod.rs:1969:13 [INFO] [stdout] | [INFO] [stdout] 1969 | / for row in rows { [INFO] [stdout] 1970 | | if let Ok(func_name) = row { [INFO] [stdout] 1971 | | changed.insert(func_name); [INFO] [stdout] 1972 | | } [INFO] [stdout] 1973 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/storage/mod.rs:1970:17 [INFO] [stdout] | [INFO] [stdout] 1970 | / if let Ok(func_name) = row { [INFO] [stdout] 1971 | | changed.insert(func_name); [INFO] [stdout] 1972 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1969 ~ for func_name in rows.flatten() { [INFO] [stdout] 1970 + changed.insert(func_name); [INFO] [stdout] 1971 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/cli/mod.rs:3216:13 [INFO] [stdout] | [INFO] [stdout] 3216 | let mut db = match MirageDb::open(&db_path) { [INFO] [stdout] | ----^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `db` [INFO] [stdout] --> src/cli/mod.rs:3216:13 [INFO] [stdout] | [INFO] [stdout] 3216 | let mut db = match MirageDb::open(&db_path) { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_db` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `output_db` [INFO] [stdout] --> src/cli/mod.rs:4241:21 [INFO] [stdout] | [INFO] [stdout] 4241 | let output_db = input_db.clone(); // In-place migration [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_output_db` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `label` [INFO] [stdout] --> src/cfg/icfg.rs:342:13 [INFO] [stdout] | [INFO] [stdout] 342 | let label = format!( [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_label` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's keys [INFO] [stdout] --> src/cli/mod.rs:1849:33 [INFO] [stdout] | [INFO] [stdout] 1849 | for (&scc_id, _) in &scc_members { [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] 1849 - for (&scc_id, _) in &scc_members { [INFO] [stdout] 1849 + for &scc_id in scc_members.keys() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/cli/mod.rs:3216:13 [INFO] [stdout] | [INFO] [stdout] 3216 | let mut db = match MirageDb::open(&db_path) { [INFO] [stdout] | ----^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `db` [INFO] [stdout] --> src/cli/mod.rs:3216:13 [INFO] [stdout] | [INFO] [stdout] 3216 | let mut db = match MirageDb::open(&db_path) { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_db` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/cli/mod.rs:2933:31 [INFO] [stdout] | [INFO] [stdout] 2933 | let show_call_graph = args.call_graph || args.both || (!args.call_graph && !args.function_loops && !args.both); [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] 2933 - let show_call_graph = args.call_graph || args.both || (!args.call_graph && !args.function_loops && !args.both); [INFO] [stdout] 2933 + let show_call_graph = !(!args.call_graph && !args.both && args.function_loops); [INFO] [stdout] | [INFO] [stdout] 2933 - let show_call_graph = args.call_graph || args.both || (!args.call_graph && !args.function_loops && !args.both); [INFO] [stdout] 2933 + let show_call_graph = args.call_graph || args.both || !args.function_loops; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/cli/mod.rs:2934:35 [INFO] [stdout] | [INFO] [stdout] 2934 | let show_function_loops = args.function_loops || args.both || (!args.call_graph && !args.function_loops && !args.both); [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] help: try [INFO] [stdout] | [INFO] [stdout] 2934 - let show_function_loops = args.function_loops || args.both || (!args.call_graph && !args.function_loops && !args.both); [INFO] [stdout] 2934 + let show_function_loops = !(!args.function_loops && !args.both && args.call_graph); [INFO] [stdout] | [INFO] [stdout] 2934 - let show_function_loops = args.function_loops || args.both || (!args.call_graph && !args.function_loops && !args.both); [INFO] [stdout] 2934 + let show_function_loops = args.function_loops || args.both || !args.call_graph; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/cli/mod.rs:3016:21 [INFO] [stdout] | [INFO] [stdout] 3016 | / for row in rows { [INFO] [stdout] 3017 | | if let Ok((function_name, function_id)) = row { [INFO] [stdout] 3018 | | // Load CFG for this function [INFO] [stdout] 3019 | | if let Ok(cfg) = load_cfg_from_db(&db, function_id) { [INFO] [stdout] ... | [INFO] [stdout] 3042 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/cli/mod.rs:3017:25 [INFO] [stdout] | [INFO] [stdout] 3017 | / if let Ok((function_name, function_id)) = row { [INFO] [stdout] 3018 | | // Load CFG for this function [INFO] [stdout] 3019 | | if let Ok(cfg) = load_cfg_from_db(&db, function_id) { [INFO] [stdout] ... | [INFO] [stdout] 3041 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 3016 ~ for (function_name, function_id) in rows.flatten() { [INFO] [stdout] 3017 + // Load CFG for this function [INFO] [stdout] 3018 + if let Ok(cfg) = load_cfg_from_db(&db, function_id) { [INFO] [stdout] 3019 + // Detect natural loops [INFO] [stdout] 3020 + let natural_loops = detect_natural_loops(&cfg); [INFO] [stdout] 3021 + [INFO] [stdout] 3022 + if !natural_loops.is_empty() { [INFO] [stdout] 3023 + let loop_infos: Vec = natural_loops.iter().map(|loop_| { [INFO] [stdout] 3024 + let nesting_level = loop_.nesting_level(&natural_loops); [INFO] [stdout] 3025 + let body_blocks: Vec = loop_.body.iter() [INFO] [stdout] 3026 + .map(|&node| cfg[node].id) [INFO] [stdout] 3027 + .collect(); [INFO] [stdout] 3028 + LoopInfo { [INFO] [stdout] 3029 + header: cfg[loop_.header].id, [INFO] [stdout] 3030 + back_edge_from: cfg[loop_.back_edge.0].id, [INFO] [stdout] 3031 + body_size: loop_.size(), [INFO] [stdout] 3032 + nesting_level, [INFO] [stdout] 3033 + body_blocks, [INFO] [stdout] 3034 + } [INFO] [stdout] 3035 + }).collect(); [INFO] [stdout] 3036 + [INFO] [stdout] 3037 + function_loops_map.insert(function_name, loop_infos); [INFO] [stdout] 3038 + } [INFO] [stdout] 3039 + } [INFO] [stdout] 3040 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `output_db` [INFO] [stdout] --> src/cli/mod.rs:4241:21 [INFO] [stdout] | [INFO] [stdout] 4241 | let output_db = input_db.clone(); // In-place migration [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_output_db` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Iterator::find` [INFO] [stdout] --> src/cfg/ast.rs:250:9 [INFO] [stdout] | [INFO] [stdout] 250 | / for child in block.children(&mut cursor) { [INFO] [stdout] 251 | | if self.is_statement(child) { [INFO] [stdout] 252 | | return Some(child); [INFO] [stdout] ... | [INFO] [stdout] 255 | | None [INFO] [stdout] | |____________^ help: replace with an iterator: `block.children(&mut cursor).find(|&child| self.is_statement(child))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find [INFO] [stdout] = note: `#[warn(clippy::manual_find)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same postfix: `Changed` [INFO] [stdout] --> src/cfg/diff.rs:94:1 [INFO] [stdout] | [INFO] [stdout] 94 | / pub enum ChangeType { [INFO] [stdout] 95 | | /// Terminator instruction changed [INFO] [stdout] 96 | | TerminatorChanged { before: String, after: String }, [INFO] [stdout] 97 | | /// Source location changed (block moved within file) [INFO] [stdout] ... | [INFO] [stdout] 102 | | EdgesChanged, [INFO] [stdout] 103 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/diff.rs:342:17 [INFO] [stdout] | [INFO] [stdout] 342 | / if idx + 1 < block_ids.len() { [INFO] [stdout] 343 | | edges.push(EdgeDiff { [INFO] [stdout] 344 | | from_block: block_id, [INFO] [stdout] 345 | | to_block: block_ids[idx + 1], [INFO] [stdout] 346 | | edge_type: "fallthrough".to_string(), [INFO] [stdout] 347 | | }); [INFO] [stdout] 348 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 340 ~ "fallthrough" | "goto" [INFO] [stdout] 341 | // Edge to next block [INFO] [stdout] 342 ~ if idx + 1 < block_ids.len() => { [INFO] [stdout] 343 | edges.push(EdgeDiff { [INFO] [stdout] ... [INFO] [stdout] 347 | }); [INFO] [stdout] 348 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/diff.rs:372:17 [INFO] [stdout] | [INFO] [stdout] 372 | / if idx + 1 < block_ids.len() { [INFO] [stdout] 373 | | edges.push(EdgeDiff { [INFO] [stdout] 374 | | from_block: block_id, [INFO] [stdout] 375 | | to_block: block_ids[idx + 1], [INFO] [stdout] 376 | | edge_type: "call".to_string(), [INFO] [stdout] 377 | | }); [INFO] [stdout] 378 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 370 ~ "call" [INFO] [stdout] 371 | // Edge to next block (return path) [INFO] [stdout] 372 ~ if idx + 1 < block_ids.len() => { [INFO] [stdout] 373 | edges.push(EdgeDiff { [INFO] [stdout] ... [INFO] [stdout] 377 | }); [INFO] [stdout] 378 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/diff.rs:419:17 [INFO] [stdout] | [INFO] [stdout] 419 | / if idx + 1 < blocks.len() { [INFO] [stdout] 420 | | let to_idx = node_indices[&((idx + 1) as i64)]; [INFO] [stdout] 421 | | graph.add_edge(from_idx, to_idx, ()); [INFO] [stdout] 422 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 418 ~ "fallthrough" | "goto" [INFO] [stdout] 419 ~ if idx + 1 < blocks.len() => { [INFO] [stdout] 420 | let to_idx = node_indices[&((idx + 1) as i64)]; [INFO] [stdout] 421 | graph.add_edge(from_idx, to_idx, ()); [INFO] [stdout] 422 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/diff.rs:435:17 [INFO] [stdout] | [INFO] [stdout] 435 | / if idx + 1 < blocks.len() { [INFO] [stdout] 436 | | let to_idx = node_indices[&((idx + 1) as i64)]; [INFO] [stdout] 437 | | graph.add_edge(from_idx, to_idx, ()); [INFO] [stdout] 438 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 434 ~ "call" [INFO] [stdout] 435 ~ if idx + 1 < blocks.len() => { [INFO] [stdout] 436 | let to_idx = node_indices[&((idx + 1) as i64)]; [INFO] [stdout] 437 | graph.add_edge(from_idx, to_idx, ()); [INFO] [stdout] 438 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Iterator::find` [INFO] [stdout] --> src/cfg/dominators.rs:210:9 [INFO] [stdout] | [INFO] [stdout] 210 | / for dom in self.dominators(b) { [INFO] [stdout] 211 | | if a_doms.contains(&dom) { [INFO] [stdout] 212 | | return Some(dom); [INFO] [stdout] ... | [INFO] [stdout] 216 | | None [INFO] [stdout] | |____________^ help: replace with an iterator: `self.dominators(b).find(|&dom| a_doms.contains(&dom))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/cfg/export.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | dot.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `dot.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/cfg/git_utils.rs:70:20 [INFO] [stdout] | [INFO] [stdout] 70 | if new_file.extension().map_or(false, |e| e == "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] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 70 - if new_file.extension().map_or(false, |e| e == "rs") { [INFO] [stdout] 70 + if new_file.extension().is_some_and(|e| e == "rs") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/cfg/git_utils.rs:130:20 [INFO] [stdout] | [INFO] [stdout] 130 | && entity.data.get("kind") [INFO] [stdout] | ____________________^ [INFO] [stdout] 131 | | .and_then(|v| v.as_str()) [INFO] [stdout] 132 | | .map_or(false, |k| k == "Function"); [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 a standard comparison instead [INFO] [stdout] | [INFO] [stdout] 130 ~ && (entity.data.get("kind") [INFO] [stdout] 131 ~ .and_then(|v| v.as_str()) == Some("Function")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/icfg.rs:222:21 [INFO] [stdout] | [INFO] [stdout] 222 | / if idx + 1 < blocks.len() { [INFO] [stdout] 223 | | let to_idx = icfg.node_map[&(function_id, blocks[idx + 1].id)]; [INFO] [stdout] 224 | | icfg.graph.add_edge(from_idx, to_idx, IcfgEdge::IntraProcedural { [INFO] [stdout] 225 | | edge_type: "fallthrough".to_string(), [INFO] [stdout] 226 | | }); [INFO] [stdout] 227 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 221 ~ "fallthrough" | "goto" | "call" [INFO] [stdout] 222 ~ if idx + 1 < blocks.len() => { [INFO] [stdout] 223 | let to_idx = icfg.node_map[&(function_id, blocks[idx + 1].id)]; [INFO] [stdout] ... [INFO] [stdout] 226 | }); [INFO] [stdout] 227 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/cfg/paths.rs:826:1 [INFO] [stdout] | [INFO] [stdout] 826 | / fn dfs_enumerate_with_context( [INFO] [stdout] 827 | | cfg: &Cfg, [INFO] [stdout] 828 | | current: NodeIndex, [INFO] [stdout] 829 | | limits: &PathLimits, [INFO] [stdout] ... | [INFO] [stdout] 834 | | loop_iterations: &mut HashMap, [INFO] [stdout] 835 | | ) { [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: this function has too many arguments (10/7) [INFO] [stdout] --> src/cfg/paths.rs:998:1 [INFO] [stdout] | [INFO] [stdout] 998 | / fn dfs_enumerate( [INFO] [stdout] 999 | | cfg: &Cfg, [INFO] [stdout] 1000 | | current: NodeIndex, [INFO] [stdout] 1001 | | exits: &HashSet, [INFO] [stdout] ... | [INFO] [stdout] 1008 | | reachable_blocks: &HashSet, [INFO] [stdout] 1009 | | ) { [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 `map_or` can be simplified [INFO] [stdout] --> src/cfg/patterns.rs:321:20 [INFO] [stdout] | [INFO] [stdout] 321 | .find(|&n| cfg.node_weight(n).map_or(false, |b| b.id == id)) [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] 321 - .find(|&n| cfg.node_weight(n).map_or(false, |b| b.id == id)) [INFO] [stdout] 321 + .find(|&n| cfg.node_weight(n).is_some_and(|b| b.id == id)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `label` [INFO] [stdout] --> src/cfg/icfg.rs:342:13 [INFO] [stdout] | [INFO] [stdout] 342 | let label = format!( [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_label` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Iterator::find` [INFO] [stdout] --> src/cfg/post_dominators.rs:173:9 [INFO] [stdout] | [INFO] [stdout] 173 | / for pdom in self.post_dominators(b) { [INFO] [stdout] 174 | | if a_pdoms.contains(&pdom) { [INFO] [stdout] 175 | | return Some(pdom); [INFO] [stdout] ... | [INFO] [stdout] 179 | | None [INFO] [stdout] | |____________^ help: replace with an iterator: `self.post_dominators(b).find(|&pdom| a_pdoms.contains(&pdom))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/cfg/summary.rs:80:25 [INFO] [stdout] | [INFO] [stdout] 80 | (kind, true) => format!("{}", kind), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `kind.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/cfg/mod.rs:88:13 [INFO] [stdout] | [INFO] [stdout] 88 | blocks: &[(i64, String, Option, Option, Option, [INFO] [stdout] | _____________^ [INFO] [stdout] 89 | | Option, Option, Option, Option)], [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: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/mod.rs:101:17 [INFO] [stdout] | [INFO] [stdout] 101 | / if idx + 1 < blocks.len() { [INFO] [stdout] 102 | | graph.add_edge( [INFO] [stdout] 103 | | NodeIndex::new(idx), [INFO] [stdout] 104 | | NodeIndex::new(idx + 1), [INFO] [stdout] 105 | | EdgeType::Fallthrough, [INFO] [stdout] 106 | | ); [INFO] [stdout] 107 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 99 ~ "fallthrough" [INFO] [stdout] 100 | // Edge to next sequential block [INFO] [stdout] 101 ~ if idx + 1 < blocks.len() => { [INFO] [stdout] 102 | graph.add_edge( [INFO] [stdout] ... [INFO] [stdout] 106 | ); [INFO] [stdout] 107 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/mod.rs:130:17 [INFO] [stdout] | [INFO] [stdout] 130 | / if idx + 1 < blocks.len() { [INFO] [stdout] 131 | | graph.add_edge( [INFO] [stdout] 132 | | NodeIndex::new(idx), [INFO] [stdout] 133 | | NodeIndex::new(idx + 1), [INFO] [stdout] 134 | | EdgeType::Fallthrough, [INFO] [stdout] 135 | | ); [INFO] [stdout] 136 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 127 ~ "goto" [INFO] [stdout] 128 | // Find target by analyzing control flow structure [INFO] [stdout] 129 | // For now, fallthrough to next (will be refined with proper target resolution) [INFO] [stdout] 130 ~ if idx + 1 < blocks.len() => { [INFO] [stdout] 131 | graph.add_edge( [INFO] [stdout] ... [INFO] [stdout] 135 | ); [INFO] [stdout] 136 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/mod.rs:147:17 [INFO] [stdout] | [INFO] [stdout] 147 | / if idx + 1 < blocks.len() { [INFO] [stdout] 148 | | graph.add_edge( [INFO] [stdout] 149 | | NodeIndex::new(idx), [INFO] [stdout] 150 | | NodeIndex::new(idx + 1), [INFO] [stdout] 151 | | EdgeType::Call, [INFO] [stdout] 152 | | ); [INFO] [stdout] 153 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 145 ~ "call" [INFO] [stdout] 146 | // Function call - edge to next block (normal return path) [INFO] [stdout] 147 ~ if idx + 1 < blocks.len() => { [INFO] [stdout] 148 | graph.add_edge( [INFO] [stdout] ... [INFO] [stdout] 152 | ); [INFO] [stdout] 153 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/storage/mod.rs:210:17 [INFO] [stdout] | [INFO] [stdout] 210 | return SqliteStorage::open(db_path).map(Backend::Sqlite); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 210 - return SqliteStorage::open(db_path).map(Backend::Sqlite); [INFO] [stdout] 210 + SqliteStorage::open(db_path).map(Backend::Sqlite) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/storage/mod.rs:212:17 [INFO] [stdout] | [INFO] [stdout] 212 | return Err(anyhow::anyhow!("Native-V3 backend detected but SQLite feature enabled")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 212 - return Err(anyhow::anyhow!("Native-V3 backend detected but SQLite feature enabled")); [INFO] [stdout] 212 + Err(anyhow::anyhow!("Native-V3 backend detected but SQLite feature enabled")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/storage/mod.rs:1049:25 [INFO] [stdout] | [INFO] [stdout] 1049 | let block_rows: Vec<(i64, String, Option, Option, Option, [INFO] [stdout] | _________________________^ [INFO] [stdout] 1050 | | Option, Option, Option, Option)> = blocks [INFO] [stdout] | |__________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/storage/mod.rs:1145:9 [INFO] [stdout] | [INFO] [stdout] 1145 | / self.conn() [INFO] [stdout] 1146 | | .and_then(|conn| Ok(function_exists(conn, function_id))) [INFO] [stdout] | |____________________________________________________________________^ help: try: `self.conn().map(|conn| function_exists(conn, function_id))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/storage/mod.rs:1178:9 [INFO] [stdout] | [INFO] [stdout] 1178 | / self.conn() [INFO] [stdout] 1179 | | .and_then(|conn| Ok(get_function_hash(conn, function_id))) [INFO] [stdout] | |______________________________________________________________________^ help: try: `self.conn().map(|conn| get_function_hash(conn, function_id))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/storage/mod.rs:1274:21 [INFO] [stdout] | [INFO] [stdout] 1274 | let block_rows: Vec<(i64, String, Option, Option, Option, [INFO] [stdout] | _____________________^ [INFO] [stdout] 1275 | | Option, Option, Option, Option)> = stmt [INFO] [stdout] | |______________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/storage/mod.rs:1325:17 [INFO] [stdout] | [INFO] [stdout] 1325 | block_rows: Vec<(i64, String, Option, Option, Option, [INFO] [stdout] | _________________^ [INFO] [stdout] 1326 | | Option, Option, Option, Option)>, [INFO] [stdout] | |_________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/storage/mod.rs:1969:13 [INFO] [stdout] | [INFO] [stdout] 1969 | / for row in rows { [INFO] [stdout] 1970 | | if let Ok(func_name) = row { [INFO] [stdout] 1971 | | changed.insert(func_name); [INFO] [stdout] 1972 | | } [INFO] [stdout] 1973 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/storage/mod.rs:1970:17 [INFO] [stdout] | [INFO] [stdout] 1970 | / if let Ok(func_name) = row { [INFO] [stdout] 1971 | | changed.insert(func_name); [INFO] [stdout] 1972 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1969 ~ for func_name in rows.flatten() { [INFO] [stdout] 1970 + changed.insert(func_name); [INFO] [stdout] 1971 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's keys [INFO] [stdout] --> src/cli/mod.rs:1849:33 [INFO] [stdout] | [INFO] [stdout] 1849 | for (&scc_id, _) in &scc_members { [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] 1849 - for (&scc_id, _) in &scc_members { [INFO] [stdout] 1849 + for &scc_id in scc_members.keys() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/cli/mod.rs:2933:31 [INFO] [stdout] | [INFO] [stdout] 2933 | let show_call_graph = args.call_graph || args.both || (!args.call_graph && !args.function_loops && !args.both); [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] 2933 - let show_call_graph = args.call_graph || args.both || (!args.call_graph && !args.function_loops && !args.both); [INFO] [stdout] 2933 + let show_call_graph = !(!args.call_graph && !args.both && args.function_loops); [INFO] [stdout] | [INFO] [stdout] 2933 - let show_call_graph = args.call_graph || args.both || (!args.call_graph && !args.function_loops && !args.both); [INFO] [stdout] 2933 + let show_call_graph = args.call_graph || args.both || !args.function_loops; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/cli/mod.rs:2934:35 [INFO] [stdout] | [INFO] [stdout] 2934 | let show_function_loops = args.function_loops || args.both || (!args.call_graph && !args.function_loops && !args.both); [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] help: try [INFO] [stdout] | [INFO] [stdout] 2934 - let show_function_loops = args.function_loops || args.both || (!args.call_graph && !args.function_loops && !args.both); [INFO] [stdout] 2934 + let show_function_loops = !(!args.function_loops && !args.both && args.call_graph); [INFO] [stdout] | [INFO] [stdout] 2934 - let show_function_loops = args.function_loops || args.both || (!args.call_graph && !args.function_loops && !args.both); [INFO] [stdout] 2934 + let show_function_loops = args.function_loops || args.both || !args.call_graph; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/cli/mod.rs:3016:21 [INFO] [stdout] | [INFO] [stdout] 3016 | / for row in rows { [INFO] [stdout] 3017 | | if let Ok((function_name, function_id)) = row { [INFO] [stdout] 3018 | | // Load CFG for this function [INFO] [stdout] 3019 | | if let Ok(cfg) = load_cfg_from_db(&db, function_id) { [INFO] [stdout] ... | [INFO] [stdout] 3042 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/cli/mod.rs:3017:25 [INFO] [stdout] | [INFO] [stdout] 3017 | / if let Ok((function_name, function_id)) = row { [INFO] [stdout] 3018 | | // Load CFG for this function [INFO] [stdout] 3019 | | if let Ok(cfg) = load_cfg_from_db(&db, function_id) { [INFO] [stdout] ... | [INFO] [stdout] 3041 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 3016 ~ for (function_name, function_id) in rows.flatten() { [INFO] [stdout] 3017 + // Load CFG for this function [INFO] [stdout] 3018 + if let Ok(cfg) = load_cfg_from_db(&db, function_id) { [INFO] [stdout] 3019 + // Detect natural loops [INFO] [stdout] 3020 + let natural_loops = detect_natural_loops(&cfg); [INFO] [stdout] 3021 + [INFO] [stdout] 3022 + if !natural_loops.is_empty() { [INFO] [stdout] 3023 + let loop_infos: Vec = natural_loops.iter().map(|loop_| { [INFO] [stdout] 3024 + let nesting_level = loop_.nesting_level(&natural_loops); [INFO] [stdout] 3025 + let body_blocks: Vec = loop_.body.iter() [INFO] [stdout] 3026 + .map(|&node| cfg[node].id) [INFO] [stdout] 3027 + .collect(); [INFO] [stdout] 3028 + LoopInfo { [INFO] [stdout] 3029 + header: cfg[loop_.header].id, [INFO] [stdout] 3030 + back_edge_from: cfg[loop_.back_edge.0].id, [INFO] [stdout] 3031 + body_size: loop_.size(), [INFO] [stdout] 3032 + nesting_level, [INFO] [stdout] 3033 + body_blocks, [INFO] [stdout] 3034 + } [INFO] [stdout] 3035 + }).collect(); [INFO] [stdout] 3036 + [INFO] [stdout] 3037 + function_loops_map.insert(function_name, loop_infos); [INFO] [stdout] 3038 + } [INFO] [stdout] 3039 + } [INFO] [stdout] 3040 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `true` [INFO] [stdout] --> src/cli/mod.rs:6835:37 [INFO] [stdout] | [INFO] [stdout] 6835 | CfgFormat::Human => assert!(true), [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] = note: `#[warn(clippy::assertions_on_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `true` [INFO] [stdout] --> src/cli/mod.rs:6836:35 [INFO] [stdout] | [INFO] [stdout] 6836 | CfgFormat::Dot => assert!(true), [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `true` [INFO] [stdout] --> src/cli/mod.rs:6837:36 [INFO] [stdout] | [INFO] [stdout] 6837 | CfgFormat::Json => assert!(true), [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Iterator::find` [INFO] [stdout] --> src/cfg/ast.rs:250:9 [INFO] [stdout] | [INFO] [stdout] 250 | / for child in block.children(&mut cursor) { [INFO] [stdout] 251 | | if self.is_statement(child) { [INFO] [stdout] 252 | | return Some(child); [INFO] [stdout] ... | [INFO] [stdout] 255 | | None [INFO] [stdout] | |____________^ help: replace with an iterator: `block.children(&mut cursor).find(|&child| self.is_statement(child))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find [INFO] [stdout] = note: `#[warn(clippy::manual_find)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same postfix: `Changed` [INFO] [stdout] --> src/cfg/diff.rs:94:1 [INFO] [stdout] | [INFO] [stdout] 94 | / pub enum ChangeType { [INFO] [stdout] 95 | | /// Terminator instruction changed [INFO] [stdout] 96 | | TerminatorChanged { before: String, after: String }, [INFO] [stdout] 97 | | /// Source location changed (block moved within file) [INFO] [stdout] ... | [INFO] [stdout] 102 | | EdgesChanged, [INFO] [stdout] 103 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/diff.rs:342:17 [INFO] [stdout] | [INFO] [stdout] 342 | / if idx + 1 < block_ids.len() { [INFO] [stdout] 343 | | edges.push(EdgeDiff { [INFO] [stdout] 344 | | from_block: block_id, [INFO] [stdout] 345 | | to_block: block_ids[idx + 1], [INFO] [stdout] 346 | | edge_type: "fallthrough".to_string(), [INFO] [stdout] 347 | | }); [INFO] [stdout] 348 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 340 ~ "fallthrough" | "goto" [INFO] [stdout] 341 | // Edge to next block [INFO] [stdout] 342 ~ if idx + 1 < block_ids.len() => { [INFO] [stdout] 343 | edges.push(EdgeDiff { [INFO] [stdout] ... [INFO] [stdout] 347 | }); [INFO] [stdout] 348 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/diff.rs:372:17 [INFO] [stdout] | [INFO] [stdout] 372 | / if idx + 1 < block_ids.len() { [INFO] [stdout] 373 | | edges.push(EdgeDiff { [INFO] [stdout] 374 | | from_block: block_id, [INFO] [stdout] 375 | | to_block: block_ids[idx + 1], [INFO] [stdout] 376 | | edge_type: "call".to_string(), [INFO] [stdout] 377 | | }); [INFO] [stdout] 378 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 370 ~ "call" [INFO] [stdout] 371 | // Edge to next block (return path) [INFO] [stdout] 372 ~ if idx + 1 < block_ids.len() => { [INFO] [stdout] 373 | edges.push(EdgeDiff { [INFO] [stdout] ... [INFO] [stdout] 377 | }); [INFO] [stdout] 378 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/diff.rs:419:17 [INFO] [stdout] | [INFO] [stdout] 419 | / if idx + 1 < blocks.len() { [INFO] [stdout] 420 | | let to_idx = node_indices[&((idx + 1) as i64)]; [INFO] [stdout] 421 | | graph.add_edge(from_idx, to_idx, ()); [INFO] [stdout] 422 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 418 ~ "fallthrough" | "goto" [INFO] [stdout] 419 ~ if idx + 1 < blocks.len() => { [INFO] [stdout] 420 | let to_idx = node_indices[&((idx + 1) as i64)]; [INFO] [stdout] 421 | graph.add_edge(from_idx, to_idx, ()); [INFO] [stdout] 422 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/diff.rs:435:17 [INFO] [stdout] | [INFO] [stdout] 435 | / if idx + 1 < blocks.len() { [INFO] [stdout] 436 | | let to_idx = node_indices[&((idx + 1) as i64)]; [INFO] [stdout] 437 | | graph.add_edge(from_idx, to_idx, ()); [INFO] [stdout] 438 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 434 ~ "call" [INFO] [stdout] 435 ~ if idx + 1 < blocks.len() => { [INFO] [stdout] 436 | let to_idx = node_indices[&((idx + 1) as i64)]; [INFO] [stdout] 437 | graph.add_edge(from_idx, to_idx, ()); [INFO] [stdout] 438 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Iterator::find` [INFO] [stdout] --> src/cfg/dominators.rs:210:9 [INFO] [stdout] | [INFO] [stdout] 210 | / for dom in self.dominators(b) { [INFO] [stdout] 211 | | if a_doms.contains(&dom) { [INFO] [stdout] 212 | | return Some(dom); [INFO] [stdout] ... | [INFO] [stdout] 216 | | None [INFO] [stdout] | |____________^ help: replace with an iterator: `self.dominators(b).find(|&dom| a_doms.contains(&dom))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/cfg/export.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | dot.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `dot.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/cfg/git_utils.rs:70:20 [INFO] [stdout] | [INFO] [stdout] 70 | if new_file.extension().map_or(false, |e| e == "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] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 70 - if new_file.extension().map_or(false, |e| e == "rs") { [INFO] [stdout] 70 + if new_file.extension().is_some_and(|e| e == "rs") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/cfg/git_utils.rs:130:20 [INFO] [stdout] | [INFO] [stdout] 130 | && entity.data.get("kind") [INFO] [stdout] | ____________________^ [INFO] [stdout] 131 | | .and_then(|v| v.as_str()) [INFO] [stdout] 132 | | .map_or(false, |k| k == "Function"); [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 a standard comparison instead [INFO] [stdout] | [INFO] [stdout] 130 ~ && (entity.data.get("kind") [INFO] [stdout] 131 ~ .and_then(|v| v.as_str()) == Some("Function")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/icfg.rs:222:21 [INFO] [stdout] | [INFO] [stdout] 222 | / if idx + 1 < blocks.len() { [INFO] [stdout] 223 | | let to_idx = icfg.node_map[&(function_id, blocks[idx + 1].id)]; [INFO] [stdout] 224 | | icfg.graph.add_edge(from_idx, to_idx, IcfgEdge::IntraProcedural { [INFO] [stdout] 225 | | edge_type: "fallthrough".to_string(), [INFO] [stdout] 226 | | }); [INFO] [stdout] 227 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 221 ~ "fallthrough" | "goto" | "call" [INFO] [stdout] 222 ~ if idx + 1 < blocks.len() => { [INFO] [stdout] 223 | let to_idx = icfg.node_map[&(function_id, blocks[idx + 1].id)]; [INFO] [stdout] ... [INFO] [stdout] 226 | }); [INFO] [stdout] 227 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/cfg/paths.rs:826:1 [INFO] [stdout] | [INFO] [stdout] 826 | / fn dfs_enumerate_with_context( [INFO] [stdout] 827 | | cfg: &Cfg, [INFO] [stdout] 828 | | current: NodeIndex, [INFO] [stdout] 829 | | limits: &PathLimits, [INFO] [stdout] ... | [INFO] [stdout] 834 | | loop_iterations: &mut HashMap, [INFO] [stdout] 835 | | ) { [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: this function has too many arguments (10/7) [INFO] [stdout] --> src/cfg/paths.rs:998:1 [INFO] [stdout] | [INFO] [stdout] 998 | / fn dfs_enumerate( [INFO] [stdout] 999 | | cfg: &Cfg, [INFO] [stdout] 1000 | | current: NodeIndex, [INFO] [stdout] 1001 | | exits: &HashSet, [INFO] [stdout] ... | [INFO] [stdout] 1008 | | reachable_blocks: &HashSet, [INFO] [stdout] 1009 | | ) { [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: length comparison to zero [INFO] [stdout] --> src/cfg/paths.rs:2891:17 [INFO] [stdout] | [INFO] [stdout] 2891 | assert!(paths.len() > 0, "Should have at least some paths"); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!paths.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/cfg/paths.rs:2982:17 [INFO] [stdout] | [INFO] [stdout] 2982 | assert!(paths.len() > 0, "Should have some paths"); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!paths.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/cfg/paths.rs:3905:17 [INFO] [stdout] | [INFO] [stdout] 3905 | assert!(paths.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!paths.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/cfg/paths.rs:4462:17 [INFO] [stdout] | [INFO] [stdout] 4462 | assert!(paths.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!paths.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/cfg/paths.rs:4480:17 [INFO] [stdout] | [INFO] [stdout] 4480 | assert!(paths.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!paths.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/cfg/paths.rs:4548:17 [INFO] [stdout] | [INFO] [stdout] 4548 | assert!(paths.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!paths.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/cfg/patterns.rs:321:20 [INFO] [stdout] | [INFO] [stdout] 321 | .find(|&n| cfg.node_weight(n).map_or(false, |b| b.id == id)) [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] 321 - .find(|&n| cfg.node_weight(n).map_or(false, |b| b.id == id)) [INFO] [stdout] 321 + .find(|&n| cfg.node_weight(n).is_some_and(|b| b.id == id)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Iterator::find` [INFO] [stdout] --> src/cfg/post_dominators.rs:173:9 [INFO] [stdout] | [INFO] [stdout] 173 | / for pdom in self.post_dominators(b) { [INFO] [stdout] 174 | | if a_pdoms.contains(&pdom) { [INFO] [stdout] 175 | | return Some(pdom); [INFO] [stdout] ... | [INFO] [stdout] 179 | | None [INFO] [stdout] | |____________^ help: replace with an iterator: `self.post_dominators(b).find(|&pdom| a_pdoms.contains(&pdom))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/cfg/summary.rs:80:25 [INFO] [stdout] | [INFO] [stdout] 80 | (kind, true) => format!("{}", kind), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `kind.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/cfg/mod.rs:88:13 [INFO] [stdout] | [INFO] [stdout] 88 | blocks: &[(i64, String, Option, Option, Option, [INFO] [stdout] | _____________^ [INFO] [stdout] 89 | | Option, Option, Option, Option)], [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: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/mod.rs:101:17 [INFO] [stdout] | [INFO] [stdout] 101 | / if idx + 1 < blocks.len() { [INFO] [stdout] 102 | | graph.add_edge( [INFO] [stdout] 103 | | NodeIndex::new(idx), [INFO] [stdout] 104 | | NodeIndex::new(idx + 1), [INFO] [stdout] 105 | | EdgeType::Fallthrough, [INFO] [stdout] 106 | | ); [INFO] [stdout] 107 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 99 ~ "fallthrough" [INFO] [stdout] 100 | // Edge to next sequential block [INFO] [stdout] 101 ~ if idx + 1 < blocks.len() => { [INFO] [stdout] 102 | graph.add_edge( [INFO] [stdout] ... [INFO] [stdout] 106 | ); [INFO] [stdout] 107 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/mod.rs:130:17 [INFO] [stdout] | [INFO] [stdout] 130 | / if idx + 1 < blocks.len() { [INFO] [stdout] 131 | | graph.add_edge( [INFO] [stdout] 132 | | NodeIndex::new(idx), [INFO] [stdout] 133 | | NodeIndex::new(idx + 1), [INFO] [stdout] 134 | | EdgeType::Fallthrough, [INFO] [stdout] 135 | | ); [INFO] [stdout] 136 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 127 ~ "goto" [INFO] [stdout] 128 | // Find target by analyzing control flow structure [INFO] [stdout] 129 | // For now, fallthrough to next (will be refined with proper target resolution) [INFO] [stdout] 130 ~ if idx + 1 < blocks.len() => { [INFO] [stdout] 131 | graph.add_edge( [INFO] [stdout] ... [INFO] [stdout] 135 | ); [INFO] [stdout] 136 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/cfg/mod.rs:147:17 [INFO] [stdout] | [INFO] [stdout] 147 | / if idx + 1 < blocks.len() { [INFO] [stdout] 148 | | graph.add_edge( [INFO] [stdout] 149 | | NodeIndex::new(idx), [INFO] [stdout] 150 | | NodeIndex::new(idx + 1), [INFO] [stdout] 151 | | EdgeType::Call, [INFO] [stdout] 152 | | ); [INFO] [stdout] 153 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 145 ~ "call" [INFO] [stdout] 146 | // Function call - edge to next block (normal return path) [INFO] [stdout] 147 ~ if idx + 1 < blocks.len() => { [INFO] [stdout] 148 | graph.add_edge( [INFO] [stdout] ... [INFO] [stdout] 152 | ); [INFO] [stdout] 153 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/storage/mod.rs:210:17 [INFO] [stdout] | [INFO] [stdout] 210 | return SqliteStorage::open(db_path).map(Backend::Sqlite); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 210 - return SqliteStorage::open(db_path).map(Backend::Sqlite); [INFO] [stdout] 210 + SqliteStorage::open(db_path).map(Backend::Sqlite) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/storage/mod.rs:212:17 [INFO] [stdout] | [INFO] [stdout] 212 | return Err(anyhow::anyhow!("Native-V3 backend detected but SQLite feature enabled")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 212 - return Err(anyhow::anyhow!("Native-V3 backend detected but SQLite feature enabled")); [INFO] [stdout] 212 + Err(anyhow::anyhow!("Native-V3 backend detected but SQLite feature enabled")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/storage/mod.rs:1049:25 [INFO] [stdout] | [INFO] [stdout] 1049 | let block_rows: Vec<(i64, String, Option, Option, Option, [INFO] [stdout] | _________________________^ [INFO] [stdout] 1050 | | Option, Option, Option, Option)> = blocks [INFO] [stdout] | |__________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/storage/mod.rs:1145:9 [INFO] [stdout] | [INFO] [stdout] 1145 | / self.conn() [INFO] [stdout] 1146 | | .and_then(|conn| Ok(function_exists(conn, function_id))) [INFO] [stdout] | |____________________________________________________________________^ help: try: `self.conn().map(|conn| function_exists(conn, function_id))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/storage/mod.rs:1178:9 [INFO] [stdout] | [INFO] [stdout] 1178 | / self.conn() [INFO] [stdout] 1179 | | .and_then(|conn| Ok(get_function_hash(conn, function_id))) [INFO] [stdout] | |______________________________________________________________________^ help: try: `self.conn().map(|conn| get_function_hash(conn, function_id))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/storage/mod.rs:1274:21 [INFO] [stdout] | [INFO] [stdout] 1274 | let block_rows: Vec<(i64, String, Option, Option, Option, [INFO] [stdout] | _____________________^ [INFO] [stdout] 1275 | | Option, Option, Option, Option)> = stmt [INFO] [stdout] | |______________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/storage/mod.rs:1325:17 [INFO] [stdout] | [INFO] [stdout] 1325 | block_rows: Vec<(i64, String, Option, Option, Option, [INFO] [stdout] | _________________^ [INFO] [stdout] 1326 | | Option, Option, Option, Option)>, [INFO] [stdout] | |_________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/storage/mod.rs:1969:13 [INFO] [stdout] | [INFO] [stdout] 1969 | / for row in rows { [INFO] [stdout] 1970 | | if let Ok(func_name) = row { [INFO] [stdout] 1971 | | changed.insert(func_name); [INFO] [stdout] 1972 | | } [INFO] [stdout] 1973 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/storage/mod.rs:1970:17 [INFO] [stdout] | [INFO] [stdout] 1970 | / if let Ok(func_name) = row { [INFO] [stdout] 1971 | | changed.insert(func_name); [INFO] [stdout] 1972 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1969 ~ for func_name in rows.flatten() { [INFO] [stdout] 1970 + changed.insert(func_name); [INFO] [stdout] 1971 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 28s [INFO] running `Command { std: "docker" "inspect" "abbf46986c40abd456cc8feb7ba483eb8d10acd562b7ca194acf42f8f826b3aa", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "abbf46986c40abd456cc8feb7ba483eb8d10acd562b7ca194acf42f8f826b3aa", kill_on_drop: false }` [INFO] [stdout] abbf46986c40abd456cc8feb7ba483eb8d10acd562b7ca194acf42f8f826b3aa