[INFO] cloning repository https://github.com/KaraZajac/KAT [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/KaraZajac/KAT" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FKaraZajac%2FKAT", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FKaraZajac%2FKAT'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 23431c4a7a3c5416a7e8d12daa8b574e8bf4ce7a [INFO] linting KaraZajac/KAT against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FKaraZajac%2FKAT" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/KaraZajac/KAT [INFO] finished tweaking git repo https://github.com/KaraZajac/KAT [INFO] tweaked toml for git repo https://github.com/KaraZajac/KAT written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/KaraZajac/KAT on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/KaraZajac/KAT 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 quote v1.0.44 [INFO] [stderr] Downloaded tracing-attributes v0.1.31 [INFO] [stderr] Downloaded thread_local v1.1.9 [INFO] [stderr] Downloaded proc-macro2 v1.0.106 [INFO] [stderr] Downloaded atty v0.2.14 [INFO] [stderr] Downloaded matchers v0.2.0 [INFO] [stderr] Downloaded hermit-abi v0.1.19 [INFO] [stderr] Downloaded wasm-bindgen-macro v0.2.108 [INFO] [stderr] Downloaded getrandom v0.2.17 [INFO] [stderr] Downloaded js-sys v0.3.85 [INFO] [stderr] Downloaded iana-time-zone v0.1.65 [INFO] [stderr] Downloaded cc v1.2.55 [INFO] [stderr] Downloaded tracing-subscriber v0.3.22 [INFO] [stderr] Downloaded crossterm v0.28.1 [INFO] [stderr] Downloaded itertools v0.10.5 [INFO] [stderr] Downloaded regex v1.12.3 [INFO] [stderr] Downloaded serde_json v1.0.149 [INFO] [stderr] Downloaded winnow v0.7.14 [INFO] [stderr] Downloaded syn v2.0.114 [INFO] [stderr] Downloaded regex-syntax v0.8.8 [INFO] [stderr] Downloaded chrono v0.4.43 [INFO] [stderr] Downloaded unicode-width v0.1.14 [INFO] [stderr] Downloaded unicode-width v0.2.0 [INFO] [stderr] Downloaded libusb1-sys v0.7.0 [INFO] [stderr] Downloaded wasm-bindgen v0.2.108 [INFO] [stderr] Downloaded darling_core v0.23.0 [INFO] [stderr] Downloaded socket2 v0.6.2 [INFO] [stderr] Downloaded aho-corasick v1.1.4 [INFO] [stderr] Downloaded wasm-bindgen-macro-support v0.2.108 [INFO] [stderr] Downloaded signal-hook v0.3.18 [INFO] [stderr] Downloaded darling v0.23.0 [INFO] [stderr] Downloaded mockall_derive v0.11.4 [INFO] [stderr] Downloaded find-msvc-tools v0.1.9 [INFO] [stderr] Downloaded rusb v0.9.4 [INFO] [stderr] Downloaded indexmap v2.13.0 [INFO] [stderr] Downloaded ratatui v0.29.0 [INFO] [stderr] Downloaded regex-automata v0.4.13 [INFO] [stderr] Downloaded ryu v1.0.22 [INFO] [stderr] Downloaded instability v0.3.11 [INFO] [stderr] Downloaded strum_macros v0.26.4 [INFO] [stderr] Downloaded normalize-line-endings v0.3.0 [INFO] [stderr] Downloaded predicates v2.1.5 [INFO] [stderr] Downloaded itoa v1.0.17 [INFO] [stderr] Downloaded zmij v1.0.17 [INFO] [stderr] Downloaded thiserror-impl v2.0.18 [INFO] [stderr] Downloaded libc v0.2.180 [INFO] [stderr] Downloaded nu-ansi-term v0.50.3 [INFO] [stderr] Downloaded wasm-bindgen-shared v0.2.108 [INFO] [stderr] Downloaded configparser v3.1.0 [INFO] [stderr] Downloaded libredox v0.1.12 [INFO] [stderr] Downloaded redox_users v0.4.6 [INFO] [stderr] Downloaded compact_str v0.8.1 [INFO] [stderr] Downloaded signal-hook-mio v0.2.5 [INFO] [stderr] Downloaded darling_macro v0.23.0 [INFO] [stderr] Downloaded indoc v2.0.7 [INFO] [stderr] Downloaded strum v0.26.3 [INFO] [stderr] Downloaded fragile v2.0.1 [INFO] [stderr] Downloaded difflib v0.4.0 [INFO] [stderr] Downloaded termtree v0.5.1 [INFO] [stderr] Downloaded tokio v1.49.0 [INFO] [stderr] Downloaded mockall v0.11.4 [INFO] [stderr] Downloaded libhackrf v0.1.1 [INFO] [stderr] Downloaded unicode-truncate v1.1.0 [INFO] [stderr] Downloaded castaway v0.2.4 [INFO] [stderr] Downloaded lru v0.12.5 [INFO] [stderr] Downloaded downcast v0.11.0 [INFO] [stderr] Downloaded predicates-core v1.0.10 [INFO] [stderr] Downloaded predicates-tree v1.0.13 [INFO] [stderr] Downloaded rtl-sdr-rs v0.3.1 [INFO] [stderr] Downloaded thiserror v2.0.18 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 79e9f8823e2755acf9b8fc56a2fd0fd66cb10918ecc0e28ff7daf6e00eddd7df [INFO] running `Command { std: "docker" "start" "-a" "79e9f8823e2755acf9b8fc56a2fd0fd66cb10918ecc0e28ff7daf6e00eddd7df", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "79e9f8823e2755acf9b8fc56a2fd0fd66cb10918ecc0e28ff7daf6e00eddd7df", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "79e9f8823e2755acf9b8fc56a2fd0fd66cb10918ecc0e28ff7daf6e00eddd7df", kill_on_drop: false }` [INFO] [stdout] 79e9f8823e2755acf9b8fc56a2fd0fd66cb10918ecc0e28ff7daf6e00eddd7df [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 657385bd436bf1e7df3c83f82a453f6a686c111a896eb1e30b2acd425c7cd83a [INFO] running `Command { std: "docker" "start" "-a" "657385bd436bf1e7df3c83f82a453f6a686c111a896eb1e30b2acd425c7cd83a", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.106 [INFO] [stderr] Compiling quote v1.0.44 [INFO] [stderr] Compiling libc v0.2.180 [INFO] [stderr] Checking cfg-if v1.0.4 [INFO] [stderr] Compiling autocfg v1.5.0 [INFO] [stderr] Compiling serde_core v1.0.228 [INFO] [stderr] Compiling pkg-config v0.3.32 [INFO] [stderr] Checking log v0.4.29 [INFO] [stderr] Compiling find-msvc-tools v0.1.9 [INFO] [stderr] Compiling rustversion v1.0.22 [INFO] [stderr] Checking regex-syntax v0.8.8 [INFO] [stderr] Checking either v1.15.0 [INFO] [stderr] Checking aho-corasick v1.1.4 [INFO] [stderr] Checking smallvec v1.15.1 [INFO] [stderr] Checking equivalent v1.0.2 [INFO] [stderr] Compiling parking_lot_core v0.9.12 [INFO] [stderr] Compiling strsim v0.11.1 [INFO] [stderr] Compiling ident_case v1.0.1 [INFO] [stderr] Compiling cc v1.2.55 [INFO] [stderr] Compiling signal-hook v0.3.18 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Checking lock_api v0.4.14 [INFO] [stderr] Checking once_cell v1.21.3 [INFO] [stderr] Compiling rustix v0.38.44 [INFO] [stderr] Checking predicates-core v1.0.10 [INFO] [stderr] Checking lazy_static v1.5.0 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking tracing-core v0.1.36 [INFO] [stderr] Checking itertools v0.10.5 [INFO] [stderr] Compiling zmij v1.0.17 [INFO] [stderr] Compiling instability v0.3.11 [INFO] [stderr] Checking itoa v1.0.17 [INFO] [stderr] Checking foldhash v0.1.5 [INFO] [stderr] Checking allocator-api2 v0.2.21 [INFO] [stderr] Checking bitflags v2.10.0 [INFO] [stderr] Compiling rusb v0.9.4 [INFO] [stderr] Compiling radium v0.7.0 [INFO] [stderr] Checking hashbrown v0.16.1 [INFO] [stderr] Checking difflib v0.4.0 [INFO] [stderr] Checking normalize-line-endings v0.3.0 [INFO] [stderr] Checking pin-project-lite v0.2.16 [INFO] [stderr] Checking linux-raw-sys v0.4.15 [INFO] [stderr] Checking termtree v0.5.1 [INFO] [stderr] Compiling paste v1.0.15 [INFO] [stderr] Checking castaway v0.2.4 [INFO] [stderr] Checking predicates-tree v1.0.13 [INFO] [stderr] Checking hashbrown v0.15.5 [INFO] [stderr] Checking itertools v0.13.0 [INFO] [stderr] Checking unicode-segmentation v1.12.0 [INFO] [stderr] Checking winnow v0.7.14 [INFO] [stderr] Checking tap v1.0.1 [INFO] [stderr] Checking static_assertions v1.1.0 [INFO] [stderr] Checking toml_write v0.1.2 [INFO] [stderr] Compiling syn v2.0.114 [INFO] [stderr] Checking fragile v2.0.1 [INFO] [stderr] Checking unicode-width v0.1.14 [INFO] [stderr] Checking downcast v0.11.0 [INFO] [stderr] Compiling indoc v2.0.7 [INFO] [stderr] Checking ryu v1.0.22 [INFO] [stderr] Compiling libusb1-sys v0.7.0 [INFO] [stderr] Checking indexmap v2.13.0 [INFO] [stderr] Compiling thiserror v2.0.18 [INFO] [stderr] Compiling serde_json v1.0.149 [INFO] [stderr] Checking float-cmp v0.9.0 [INFO] [stderr] Checking num-complex v0.4.6 [INFO] [stderr] Checking compact_str v0.8.1 [INFO] [stderr] Checking lru v0.12.5 [INFO] [stderr] Checking errno v0.3.14 [INFO] [stderr] Checking mio v1.1.1 [INFO] [stderr] Checking socket2 v0.6.2 [INFO] [stderr] Checking dirs-sys v0.4.1 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Checking signal-hook-registry v1.4.8 [INFO] [stderr] Checking wyz v0.5.1 [INFO] [stderr] Checking regex-automata v0.4.13 [INFO] [stderr] Checking tracing-log v0.2.0 [INFO] [stderr] Compiling kat v1.1.3 (/opt/rustwide/workdir) [INFO] [stderr] Checking sharded-slab v0.1.7 [INFO] [stderr] Checking thread_local v1.1.9 [INFO] [stderr] Checking nu-ansi-term v0.50.3 [INFO] [stderr] Checking unicode-width v0.2.0 [INFO] [stderr] Checking signal-hook-mio v0.2.5 [INFO] [stderr] Checking bytes v1.11.0 [INFO] [stderr] Checking byteorder v1.5.0 [INFO] [stderr] Checking crossterm v0.28.1 [INFO] [stderr] Checking unicode-truncate v1.1.0 [INFO] [stderr] Checking iana-time-zone v0.1.65 [INFO] [stderr] Checking funty v2.0.0 [INFO] [stderr] Checking dirs v5.0.1 [INFO] [stderr] Checking libhackrf v0.1.1 [INFO] [stderr] Checking atty v0.2.14 [INFO] [stderr] Checking configparser v3.1.0 [INFO] [stderr] Checking bitvec v1.0.1 [INFO] [stderr] Compiling darling_core v0.23.0 [INFO] [stderr] Checking regex v1.12.3 [INFO] [stderr] Checking matchers v0.2.0 [INFO] [stderr] Compiling mockall_derive v0.11.4 [INFO] [stderr] Checking predicates v2.1.5 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling tracing-attributes v0.1.31 [INFO] [stderr] Compiling strum_macros v0.26.4 [INFO] [stderr] Compiling tokio-macros v2.6.0 [INFO] [stderr] Compiling thiserror-impl v2.0.18 [INFO] [stderr] Checking tokio v1.49.0 [INFO] [stderr] Checking tracing v0.1.44 [INFO] [stderr] Checking tracing-subscriber v0.3.22 [INFO] [stderr] Checking strum v0.26.3 [INFO] [stderr] Checking mockall v0.11.4 [INFO] [stderr] Checking rtl-sdr-rs v0.3.1 [INFO] [stderr] Compiling darling_macro v0.23.0 [INFO] [stderr] Compiling darling v0.23.0 [INFO] [stderr] Checking ratatui v0.29.0 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking serde_spanned v0.6.9 [INFO] [stderr] Checking toml_datetime v0.6.11 [INFO] [stderr] Checking chrono v0.4.43 [INFO] [stderr] Checking toml_edit v0.22.27 [INFO] [stderr] Checking toml v0.8.23 [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/protocols/vag.rs:21:1 [INFO] [stdout] | [INFO] [stdout] 21 | use tracing; [INFO] [stdout] | ^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/protocols/vag.rs:21:1 [INFO] [stdout] | [INFO] [stdout] 21 | use tracing; [INFO] [stdout] | ^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/app.rs:268:1 [INFO] [stdout] | [INFO] [stdout] 268 | / pub enum RadioEvent { [INFO] [stdout] 269 | | /// New signal captured [INFO] [stdout] 270 | | SignalCaptured(Capture), [INFO] [stdout] | | ----------------------- the largest variant contains at least 264 bytes [INFO] [stdout] 271 | | /// Error occurred [INFO] [stdout] 272 | | Error(String), [INFO] [stdout] | | ------------- the second-largest variant contains at least 24 bytes [INFO] [stdout] ... | [INFO] [stdout] 275 | | StateChanged(RadioState), [INFO] [stdout] 276 | | } [INFO] [stdout] | |_^ the entire enum is at least 264 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 270 - SignalCaptured(Capture), [INFO] [stdout] 270 + SignalCaptured(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/app.rs:425:31 [INFO] [stdout] | [INFO] [stdout] 425 | let device_detected = radio.as_ref().map_or(false, |r| r.is_available()); [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] 425 - let device_detected = radio.as_ref().map_or(false, |r| r.is_available()); [INFO] [stdout] 425 + let device_detected = radio.as_ref().is_some_and(|r| r.is_available()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/app.rs:525:9 [INFO] [stdout] | [INFO] [stdout] 525 | self.radio.as_ref().map_or(false, |r| r.supports_tx()) [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] 525 - self.radio.as_ref().map_or(false, |r| r.supports_tx()) [INFO] [stdout] 525 + self.radio.as_ref().is_some_and(|r| r.supports_tx()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/app.rs:628:40 [INFO] [stdout] | [INFO] [stdout] 628 | let parts: Vec<&str> = command.trim().split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/app.rs:748:12 [INFO] [stdout] | [INFO] [stdout] 748 | if hz < 300_000_000 || hz > 928_000_000 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(300_000_000..=928_000_000).contains(&hz)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/app.rs:1201:22 [INFO] [stdout] | [INFO] [stdout] 1201 | let has_tx = self.radio.as_ref().map_or(false, |r| r.supports_tx()); [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] 1201 - let has_tx = self.radio.as_ref().map_or(false, |r| r.supports_tx()); [INFO] [stdout] 1201 + let has_tx = self.radio.as_ref().is_some_and(|r| r.supports_tx()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/app.rs:1205:31 [INFO] [stdout] | [INFO] [stdout] 1205 | let encoder_capable = selected [INFO] [stdout] | _______________________________^ [INFO] [stdout] 1206 | | .map_or(false, |c| c.status == crate::capture::CaptureStatus::EncoderCapable); [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] 1206 - .map_or(false, |c| c.status == crate::capture::CaptureStatus::EncoderCapable); [INFO] [stdout] 1206 + .is_some_and(|c| c.status == crate::capture::CaptureStatus::EncoderCapable); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/app.rs:1207:33 [INFO] [stdout] | [INFO] [stdout] 1207 | let is_non_car_keeloq = selected [INFO] [stdout] | _________________________________^ [INFO] [stdout] 1208 | | .map_or(false, |c| is_keeloq_non_car(c.protocol_name())); [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] 1208 - .map_or(false, |c| is_keeloq_non_car(c.protocol_name())); [INFO] [stdout] 1208 + .is_some_and(|c| is_keeloq_non_car(c.protocol_name())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/app.rs:1368:18 [INFO] [stdout] | [INFO] [stdout] 1368 | .map(|c| Self::default_export_filename(c)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Self::default_export_filename` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `as_ref.map(...)` does nothing [INFO] [stdout] --> src/app.rs:1379:27 [INFO] [stdout] | [INFO] [stdout] 1379 | .and_then(|c| c.make.as_ref().map(String::clone)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `c.make.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] = note: `#[warn(clippy::useless_asref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are explicitly cloning with `.map()` [INFO] [stdout] --> src/app.rs:1388:30 [INFO] [stdout] | [INFO] [stdout] 1388 | self.fob_meta_year = capture [INFO] [stdout] | ______________________________^ [INFO] [stdout] 1389 | | .and_then(|c| c.year.as_ref()) [INFO] [stdout] 1390 | | .map(String::clone) [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] help: consider calling the dedicated `cloned` method [INFO] [stdout] | [INFO] [stdout] 1388 ~ self.fob_meta_year = capture [INFO] [stdout] 1389 + .and_then(|c| c.year.as_ref()).cloned() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are explicitly cloning with `.map()` [INFO] [stdout] --> src/app.rs:1393:31 [INFO] [stdout] | [INFO] [stdout] 1393 | self.fob_meta_model = capture [INFO] [stdout] | _______________________________^ [INFO] [stdout] 1394 | | .and_then(|c| c.model.as_ref()) [INFO] [stdout] 1395 | | .map(String::clone) [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] help: consider calling the dedicated `cloned` method [INFO] [stdout] | [INFO] [stdout] 1393 ~ self.fob_meta_model = capture [INFO] [stdout] 1394 + .and_then(|c| c.model.as_ref()).cloned() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are explicitly cloning with `.map()` [INFO] [stdout] --> src/app.rs:1397:32 [INFO] [stdout] | [INFO] [stdout] 1397 | self.fob_meta_region = capture [INFO] [stdout] | ________________________________^ [INFO] [stdout] 1398 | | .and_then(|c| c.region.as_ref()) [INFO] [stdout] 1399 | | .map(String::clone) [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] help: consider calling the dedicated `cloned` method [INFO] [stdout] | [INFO] [stdout] 1397 ~ self.fob_meta_region = capture [INFO] [stdout] 1398 + .and_then(|c| c.region.as_ref()).cloned() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/app.rs:1592:9 [INFO] [stdout] | [INFO] [stdout] 1592 | dirs.sort_by(|a, b| a.0.to_lowercase().cmp(&b.0.to_lowercase())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1592 - dirs.sort_by(|a, b| a.0.to_lowercase().cmp(&b.0.to_lowercase())); [INFO] [stdout] 1592 + dirs.sort_by_key(|a| a.0.to_lowercase()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/app.rs:1593:9 [INFO] [stdout] | [INFO] [stdout] 1593 | files.sort_by(|a, b| a.0.to_lowercase().cmp(&b.0.to_lowercase())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1593 - files.sort_by(|a, b| a.0.to_lowercase().cmp(&b.0.to_lowercase())); [INFO] [stdout] 1593 + files.sort_by_key(|a| a.0.to_lowercase()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/app.rs:1652:26 [INFO] [stdout] | [INFO] [stdout] 1652 | let is_sub = path.extension().map_or(false, |e| e == "sub"); [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] 1652 - let is_sub = path.extension().map_or(false, |e| e == "sub"); [INFO] [stdout] 1652 + let is_sub = path.extension().is_some_and(|e| e == "sub"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:1704:29 [INFO] [stdout] | [INFO] [stdout] 1704 | / ... if research_mode || capture.protocol.is_some() { [INFO] [stdout] 1705 | | ... if !self.capture_duplicate_of_existing(&capture) { [INFO] [stdout] 1706 | | ... self.next_capture_id += 1; [INFO] [stdout] 1707 | | ... capture.source_file = Some(Self::path_relative_to_import(path, self.storage.import_dir())); [INFO] [stdout] ... | [INFO] [stdout] 1712 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1704 ~ if (research_mode || capture.protocol.is_some()) { [INFO] [stdout] 1705 ~ && !self.capture_duplicate_of_existing(&capture) { [INFO] [stdout] 1706 | self.next_capture_id += 1; [INFO] [stdout] ... [INFO] [stdout] 1710 | any_decoded_added = true; [INFO] [stdout] 1711 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/app.rs:1794:18 [INFO] [stdout] | [INFO] [stdout] 1794 | .map(|c| Self::default_export_filename(c)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Self::default_export_filename` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/capture.rs:213:25 [INFO] [stdout] | [INFO] [stdout] 213 | let bytes = (self.data_count_bit + 7) / 8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `self.data_count_bit.div_ceil(8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/app.rs:268:1 [INFO] [stdout] | [INFO] [stdout] 268 | / pub enum RadioEvent { [INFO] [stdout] 269 | | /// New signal captured [INFO] [stdout] 270 | | SignalCaptured(Capture), [INFO] [stdout] | | ----------------------- the largest variant contains at least 264 bytes [INFO] [stdout] 271 | | /// Error occurred [INFO] [stdout] 272 | | Error(String), [INFO] [stdout] | | ------------- the second-largest variant contains at least 24 bytes [INFO] [stdout] ... | [INFO] [stdout] 275 | | StateChanged(RadioState), [INFO] [stdout] 276 | | } [INFO] [stdout] | |_^ the entire enum is at least 264 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 270 - SignalCaptured(Capture), [INFO] [stdout] 270 + SignalCaptured(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/app.rs:425:31 [INFO] [stdout] | [INFO] [stdout] 425 | let device_detected = radio.as_ref().map_or(false, |r| r.is_available()); [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] 425 - let device_detected = radio.as_ref().map_or(false, |r| r.is_available()); [INFO] [stdout] 425 + let device_detected = radio.as_ref().is_some_and(|r| r.is_available()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/app.rs:525:9 [INFO] [stdout] | [INFO] [stdout] 525 | self.radio.as_ref().map_or(false, |r| r.supports_tx()) [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] 525 - self.radio.as_ref().map_or(false, |r| r.supports_tx()) [INFO] [stdout] 525 + self.radio.as_ref().is_some_and(|r| r.supports_tx()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/app.rs:628:40 [INFO] [stdout] | [INFO] [stdout] 628 | let parts: Vec<&str> = command.trim().split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/app.rs:748:12 [INFO] [stdout] | [INFO] [stdout] 748 | if hz < 300_000_000 || hz > 928_000_000 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(300_000_000..=928_000_000).contains(&hz)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/export/fob.rs:412:34 [INFO] [stdout] | [INFO] [stdout] 412 | if path.is_file() && path.extension().map_or(false, |e| e == "fob") { [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] 412 - if path.is_file() && path.extension().map_or(false, |e| e == "fob") { [INFO] [stdout] 412 + if path.is_file() && path.extension().is_some_and(|e| e == "fob") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/app.rs:1201:22 [INFO] [stdout] | [INFO] [stdout] 1201 | let has_tx = self.radio.as_ref().map_or(false, |r| r.supports_tx()); [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] 1201 - let has_tx = self.radio.as_ref().map_or(false, |r| r.supports_tx()); [INFO] [stdout] 1201 + let has_tx = self.radio.as_ref().is_some_and(|r| r.supports_tx()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/app.rs:1205:31 [INFO] [stdout] | [INFO] [stdout] 1205 | let encoder_capable = selected [INFO] [stdout] | _______________________________^ [INFO] [stdout] 1206 | | .map_or(false, |c| c.status == crate::capture::CaptureStatus::EncoderCapable); [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] 1206 - .map_or(false, |c| c.status == crate::capture::CaptureStatus::EncoderCapable); [INFO] [stdout] 1206 + .is_some_and(|c| c.status == crate::capture::CaptureStatus::EncoderCapable); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/app.rs:1207:33 [INFO] [stdout] | [INFO] [stdout] 1207 | let is_non_car_keeloq = selected [INFO] [stdout] | _________________________________^ [INFO] [stdout] 1208 | | .map_or(false, |c| is_keeloq_non_car(c.protocol_name())); [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] 1208 - .map_or(false, |c| is_keeloq_non_car(c.protocol_name())); [INFO] [stdout] 1208 + .is_some_and(|c| is_keeloq_non_car(c.protocol_name())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/export/flipper.rs:62:12 [INFO] [stdout] | [INFO] [stdout] 62 | if p.extension().map_or(false, |e| e == "sub") { [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] 62 - if p.extension().map_or(false, |e| e == "sub") { [INFO] [stdout] 62 + if p.extension().is_some_and(|e| e == "sub") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/export/mod.rs:31:16 [INFO] [stdout] | [INFO] [stdout] 31 | } else if path.is_file() { [INFO] [stdout] | ________________^ [INFO] [stdout] 32 | | if path.extension().map_or(false, |e| e == "fob" || e == "sub") { [INFO] [stdout] 33 | | out.push(path); [INFO] [stdout] 34 | | } [INFO] [stdout] 35 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 31 ~ } else if path.is_file() [INFO] [stdout] 32 ~ && path.extension().map_or(false, |e| e == "fob" || e == "sub") { [INFO] [stdout] 33 | out.push(path); [INFO] [stdout] 34 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/export/mod.rs:32:16 [INFO] [stdout] | [INFO] [stdout] 32 | if path.extension().map_or(false, |e| e == "fob" || e == "sub") { [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] 32 - if path.extension().map_or(false, |e| e == "fob" || e == "sub") { [INFO] [stdout] 32 + if path.extension().is_some_and(|e| e == "fob" || e == "sub") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/app.rs:1368:18 [INFO] [stdout] | [INFO] [stdout] 1368 | .map(|c| Self::default_export_filename(c)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Self::default_export_filename` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `as_ref.map(...)` does nothing [INFO] [stdout] --> src/app.rs:1379:27 [INFO] [stdout] | [INFO] [stdout] 1379 | .and_then(|c| c.make.as_ref().map(String::clone)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `c.make.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] = note: `#[warn(clippy::useless_asref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are explicitly cloning with `.map()` [INFO] [stdout] --> src/app.rs:1388:30 [INFO] [stdout] | [INFO] [stdout] 1388 | self.fob_meta_year = capture [INFO] [stdout] | ______________________________^ [INFO] [stdout] 1389 | | .and_then(|c| c.year.as_ref()) [INFO] [stdout] 1390 | | .map(String::clone) [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] help: consider calling the dedicated `cloned` method [INFO] [stdout] | [INFO] [stdout] 1388 ~ self.fob_meta_year = capture [INFO] [stdout] 1389 + .and_then(|c| c.year.as_ref()).cloned() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are explicitly cloning with `.map()` [INFO] [stdout] --> src/app.rs:1393:31 [INFO] [stdout] | [INFO] [stdout] 1393 | self.fob_meta_model = capture [INFO] [stdout] | _______________________________^ [INFO] [stdout] 1394 | | .and_then(|c| c.model.as_ref()) [INFO] [stdout] 1395 | | .map(String::clone) [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] help: consider calling the dedicated `cloned` method [INFO] [stdout] | [INFO] [stdout] 1393 ~ self.fob_meta_model = capture [INFO] [stdout] 1394 + .and_then(|c| c.model.as_ref()).cloned() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are explicitly cloning with `.map()` [INFO] [stdout] --> src/app.rs:1397:32 [INFO] [stdout] | [INFO] [stdout] 1397 | self.fob_meta_region = capture [INFO] [stdout] | ________________________________^ [INFO] [stdout] 1398 | | .and_then(|c| c.region.as_ref()) [INFO] [stdout] 1399 | | .map(String::clone) [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] help: consider calling the dedicated `cloned` method [INFO] [stdout] | [INFO] [stdout] 1397 ~ self.fob_meta_region = capture [INFO] [stdout] 1398 + .and_then(|c| c.region.as_ref()).cloned() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> src/protocols/common.rs:101:20 [INFO] [stdout] | [INFO] [stdout] 101 | Some(s) if s.is_empty() => return "UNKNOWN", [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] = note: `#[warn(clippy::redundant_guards)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 101 - Some(s) if s.is_empty() => return "UNKNOWN", [INFO] [stdout] 101 + Some("") => return "UNKNOWN", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/app.rs:1592:9 [INFO] [stdout] | [INFO] [stdout] 1592 | dirs.sort_by(|a, b| a.0.to_lowercase().cmp(&b.0.to_lowercase())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1592 - dirs.sort_by(|a, b| a.0.to_lowercase().cmp(&b.0.to_lowercase())); [INFO] [stdout] 1592 + dirs.sort_by_key(|a| a.0.to_lowercase()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/app.rs:1593:9 [INFO] [stdout] | [INFO] [stdout] 1593 | files.sort_by(|a, b| a.0.to_lowercase().cmp(&b.0.to_lowercase())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1593 - files.sort_by(|a, b| a.0.to_lowercase().cmp(&b.0.to_lowercase())); [INFO] [stdout] 1593 + files.sort_by_key(|a| a.0.to_lowercase()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/protocols/keeloq.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | //! Decryption tries all keystore keys with simple, normal, secure, magic_xor_type1, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 8 | //! Decryption tries all keystore keys with simple, normal, secure, magic_xor_type1, [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/protocols/keeloq.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | //! magic_serial type1/2/3 (and both key byte orders). Encoder uses simple learning [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 9 | //! magic_serial type1/2/3 (and both key byte orders). Encoder uses simple learning [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/protocols/keeloq.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | //! and the key stored in DecodedSignal::extra (set when decoded). [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 10 | //! and the key stored in DecodedSignal::extra (set when decoded). [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/keeloq.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | / if a < b { [INFO] [stdout] 29 | | b - a [INFO] [stdout] 30 | | } else { [INFO] [stdout] 31 | | a - b [INFO] [stdout] 32 | | } [INFO] [stdout] | |_____^ help: replace with `abs_diff`: `b.abs_diff(a)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] = note: `#[warn(clippy::manual_abs_diff)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/app.rs:1652:26 [INFO] [stdout] | [INFO] [stdout] 1652 | let is_sub = path.extension().map_or(false, |e| e == "sub"); [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] 1652 - let is_sub = path.extension().map_or(false, |e| e == "sub"); [INFO] [stdout] 1652 + let is_sub = path.extension().is_some_and(|e| e == "sub"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/app.rs:1704:29 [INFO] [stdout] | [INFO] [stdout] 1704 | / ... if research_mode || capture.protocol.is_some() { [INFO] [stdout] 1705 | | ... if !self.capture_duplicate_of_existing(&capture) { [INFO] [stdout] 1706 | | ... self.next_capture_id += 1; [INFO] [stdout] 1707 | | ... capture.source_file = Some(Self::path_relative_to_import(path, self.storage.import_dir())); [INFO] [stdout] ... | [INFO] [stdout] 1712 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1704 ~ if (research_mode || capture.protocol.is_some()) { [INFO] [stdout] 1705 ~ && !self.capture_duplicate_of_existing(&capture) { [INFO] [stdout] 1706 | self.next_capture_id += 1; [INFO] [stdout] ... [INFO] [stdout] 1710 | any_decoded_added = true; [INFO] [stdout] 1711 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/app.rs:1794:18 [INFO] [stdout] | [INFO] [stdout] 1794 | .map(|c| Self::default_export_filename(c)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Self::default_export_filename` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `b` [INFO] [stdout] --> src/protocols/keeloq_generic.rs:64:18 [INFO] [stdout] | [INFO] [stdout] 64 | for i in 0..9 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 64 - for i in 0..9 { [INFO] [stdout] 64 + for in &mut b { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `state` [INFO] [stdout] --> src/protocols/aut64.rs:112:14 [INFO] [stdout] | [INFO] [stdout] 112 | for i in 0..(AUT64_BLOCK_SIZE - 1) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 112 - for i in 0..(AUT64_BLOCK_SIZE - 1) { [INFO] [stdout] 112 + for (i, ) in state.iter().enumerate().take((AUT64_BLOCK_SIZE - 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `reversed` [INFO] [stdout] --> src/protocols/aut64.rs:206:14 [INFO] [stdout] | [INFO] [stdout] 206 | for i in 0..len { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 206 - for i in 0..len { [INFO] [stdout] 206 + for (i, ) in reversed.iter_mut().enumerate().take(len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `box_in` [INFO] [stdout] --> src/protocols/aut64.rs:207:18 [INFO] [stdout] | [INFO] [stdout] 207 | for j in 0..len { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 207 - for j in 0..len { [INFO] [stdout] 207 + for (j, ) in box_in.iter().enumerate().take(len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/protocols/aut64.rs:310:5 [INFO] [stdout] | [INFO] [stdout] 310 | dest.index = src[0]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `protocols::aut64::Aut64Key { index: src[0], ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/protocols/aut64.rs:309:5 [INFO] [stdout] | [INFO] [stdout] 309 | let mut dest = Aut64Key::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/protocols/keys.rs:49:1 [INFO] [stdout] | [INFO] [stdout] 49 | / impl Default for KeyStore { [INFO] [stdout] 50 | | fn default() -> Self { [INFO] [stdout] 51 | | Self { [INFO] [stdout] 52 | | kia_mf_key: 0, [INFO] [stdout] ... | [INFO] [stdout] 61 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 32 + #[derive(Default)] [INFO] [stdout] 33 | pub struct KeyStore { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocols/kia_v1.rs:195:17 [INFO] [stdout] | [INFO] [stdout] 195 | / if self.header_count > 70 { [INFO] [stdout] 196 | | if !level && is_short && duration_diff!(self.te_last, TE_LONG) < TE_DELTA { [INFO] [stdout] 197 | | self.decode_count_bit = 1; [INFO] [stdout] 198 | | self.decode_data = 1; // Add first bit [INFO] [stdout] ... | [INFO] [stdout] 202 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 195 ~ if self.header_count > 70 [INFO] [stdout] 196 ~ && !level && is_short && duration_diff!(self.te_last, TE_LONG) < TE_DELTA { [INFO] [stdout] 197 | self.decode_count_bit = 1; [INFO] [stdout] ... [INFO] [stdout] 200 | self.step = DecoderStep::DecodeData; [INFO] [stdout] 201 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/capture.rs:213:25 [INFO] [stdout] | [INFO] [stdout] 213 | let bytes = (self.data_count_bit + 7) / 8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `self.data_count_bit.div_ceil(8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/protocols/kia_v3_v4.rs:103:29 [INFO] [stdout] | [INFO] [stdout] 103 | let num_bytes = ((self.raw_bit_count + 7) / 8) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `self.raw_bit_count.div_ceil(8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `b` [INFO] [stdout] --> src/protocols/kia_v3_v4.rs:104:22 [INFO] [stdout] | [INFO] [stdout] 104 | for i in 0..num_bytes { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 104 - for i in 0..num_bytes { [INFO] [stdout] 104 + for in b.iter_mut().take(num_bytes) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/protocols/kia_v3_v4.rs:376:39 [INFO] [stdout] | [INFO] [stdout] 376 | raw_bytes[0] = Self::reverse8((encrypted >> 0) as u8); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider reducing it to: `encrypted` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/protocols/kia_v3_v4.rs:382:39 [INFO] [stdout] | [INFO] [stdout] 382 | raw_bytes[4] = Self::reverse8((serial_btn >> 0) as u8); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider reducing it to: `serial_btn` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `byte_idx` is used to index `raw_bytes` [INFO] [stdout] --> src/protocols/kia_v3_v4.rs:426:29 [INFO] [stdout] | [INFO] [stdout] 426 | for byte_idx in 0..9 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 426 - for byte_idx in 0..9 { [INFO] [stdout] 426 + for (byte_idx, ) in raw_bytes.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `keystore_bytes` [INFO] [stdout] --> src/protocols/kia_v5.rs:78:18 [INFO] [stdout] | [INFO] [stdout] 78 | for i in 0..8 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 78 - for i in 0..8 { [INFO] [stdout] 78 + for (i, ) in keystore_bytes.iter_mut().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/protocols/kia_v5.rs:101:21 [INFO] [stdout] | [INFO] [stdout] 101 | base = base << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `base <<= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/protocols/kia_v5.rs:104:28 [INFO] [stdout] | [INFO] [stdout] 104 | let temp = (s3 ^ s1) & 0xFF; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider reducing it to: `(s3 ^ s1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/protocols/kia_v5.rs:119:27 [INFO] [stdout] | [INFO] [stdout] 119 | let chk = (base ^ (r ^ temp)) & 0xFF; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(base ^ (r ^ temp))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/protocols/kia_v5.rs:129:9 [INFO] [stdout] | [INFO] [stdout] 129 | ((s0 as u16) + ((s1 as u16) << 8)) & 0xFFFF [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((s0 as u16) + ((s1 as u16) << 8))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocols/kia_v5.rs:269:24 [INFO] [stdout] | [INFO] [stdout] 269 | if (is_short && duration_diff!(self.te_last, TE_SHORT) < TE_DELTA) || [INFO] [stdout] | ________________________^ [INFO] [stdout] 270 | | (is_long && duration_diff!(self.te_last, TE_SHORT) < TE_DELTA) || [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] 269 - if (is_short && duration_diff!(self.te_last, TE_SHORT) < TE_DELTA) || [INFO] [stdout] 270 - (is_long && duration_diff!(self.te_last, TE_SHORT) < TE_DELTA) || [INFO] [stdout] 269 + if !(duration_diff!(self.te_last, TE_SHORT) >= TE_DELTA || !is_short && !is_long) || [INFO] [stdout] | [INFO] [stdout] 269 - if (is_short && duration_diff!(self.te_last, TE_SHORT) < TE_DELTA) || [INFO] [stdout] 270 - (is_long && duration_diff!(self.te_last, TE_SHORT) < TE_DELTA) || [INFO] [stdout] 269 + if (is_long || is_short) && duration_diff!(self.te_last, TE_SHORT) < TE_DELTA || [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like you are swapping elements of `state` manually [INFO] [stdout] --> src/protocols/kia_v6.rs:170:9 [INFO] [stdout] | [INFO] [stdout] 170 | / let temp = state[2]; [INFO] [stdout] 171 | | state[2] = state[10]; [INFO] [stdout] 172 | | state[10] = temp; [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stdout] = note: `#[warn(clippy::manual_swap)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 170 ~ let temp = state[2]; [INFO] [stdout] 171 + state.swap(2, 10); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like you are swapping elements of `state` manually [INFO] [stdout] --> src/protocols/kia_v6.rs:173:9 [INFO] [stdout] | [INFO] [stdout] 173 | / let temp = state[6]; [INFO] [stdout] 174 | | state[6] = state[14]; [INFO] [stdout] 175 | | state[14] = temp; [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 173 ~ let temp = state[6]; [INFO] [stdout] 174 + state.swap(6, 14); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `aes_key` [INFO] [stdout] --> src/protocols/kia_v6.rs:299:18 [INFO] [stdout] | [INFO] [stdout] 299 | for i in 0..8 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 299 - for i in 0..8 { [INFO] [stdout] 299 + for (i, ) in aes_key.iter_mut().enumerate().take(8) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocols/kia_v6.rs:450:17 [INFO] [stdout] | [INFO] [stdout] 450 | / if diff_long < TE_DELTA && diff_long < diff_short { [INFO] [stdout] 451 | | if self.header_count >= PREAMBLE_COUNT { [INFO] [stdout] 452 | | self.header_count = 0; [INFO] [stdout] 453 | | self.te_last = duration; [INFO] [stdout] ... | [INFO] [stdout] 457 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 450 ~ if diff_long < TE_DELTA && diff_long < diff_short [INFO] [stdout] 451 ~ && self.header_count >= PREAMBLE_COUNT { [INFO] [stdout] 452 | self.header_count = 0; [INFO] [stdout] ... [INFO] [stdout] 455 | return None; [INFO] [stdout] 456 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `buf` [INFO] [stdout] --> src/protocols/ford_v0.rs:208:18 [INFO] [stdout] | [INFO] [stdout] 208 | for i in 0..8 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 208 - for i in 0..8 { [INFO] [stdout] 208 + for (i, ) in buf.iter_mut().enumerate().take(8) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `buf` [INFO] [stdout] --> src/protocols/ford_v0.rs:218:18 [INFO] [stdout] | [INFO] [stdout] 218 | for i in 0..8 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 218 - for i in 0..8 { [INFO] [stdout] 218 + for (i, ) in buf.iter_mut().enumerate().take(8) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `buf` [INFO] [stdout] --> src/protocols/ford_v0.rs:248:18 [INFO] [stdout] | [INFO] [stdout] 248 | for i in 0..8 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 248 - for i in 0..8 { [INFO] [stdout] 248 + for (i, ) in buf.iter_mut().enumerate().take(8) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `idx` is only used to index `buf` [INFO] [stdout] --> src/protocols/ford_v0.rs:273:20 [INFO] [stdout] | [INFO] [stdout] 273 | for idx in 1..limit { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 273 - for idx in 1..limit { [INFO] [stdout] 273 + for in buf.iter_mut().take(limit).skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/export/fob.rs:412:34 [INFO] [stdout] | [INFO] [stdout] 412 | if path.is_file() && path.extension().map_or(false, |e| e == "fob") { [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] 412 - if path.is_file() && path.extension().map_or(false, |e| e == "fob") { [INFO] [stdout] 412 + if path.is_file() && path.extension().is_some_and(|e| e == "fob") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/export/flipper.rs:62:12 [INFO] [stdout] | [INFO] [stdout] 62 | if p.extension().map_or(false, |e| e == "sub") { [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] 62 - if p.extension().map_or(false, |e| e == "sub") { [INFO] [stdout] 62 + if p.extension().is_some_and(|e| e == "sub") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/export/mod.rs:31:16 [INFO] [stdout] | [INFO] [stdout] 31 | } else if path.is_file() { [INFO] [stdout] | ________________^ [INFO] [stdout] 32 | | if path.extension().map_or(false, |e| e == "fob" || e == "sub") { [INFO] [stdout] 33 | | out.push(path); [INFO] [stdout] 34 | | } [INFO] [stdout] 35 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 31 ~ } else if path.is_file() [INFO] [stdout] 32 ~ && path.extension().map_or(false, |e| e == "fob" || e == "sub") { [INFO] [stdout] 33 | out.push(path); [INFO] [stdout] 34 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/protocols/vag.rs:411:21 [INFO] [stdout] | [INFO] [stdout] 411 | return; [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] 410 - self.fill_from_decrypted(&block_copy, dispatch_byte); [INFO] [stdout] 411 - return; [INFO] [stdout] 410 + self.fill_from_decrypted(&block_copy, dispatch_byte); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/export/mod.rs:32:16 [INFO] [stdout] | [INFO] [stdout] 32 | if path.extension().map_or(false, |e| e == "fob" || e == "sub") { [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] 32 - if path.extension().map_or(false, |e| e == "fob" || e == "sub") { [INFO] [stdout] 32 + if path.extension().is_some_and(|e| e == "fob" || e == "sub") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/protocols/vag.rs:460:21 [INFO] [stdout] | [INFO] [stdout] 460 | let extra = match decoded.extra { [INFO] [stdout] | _____________________^ [INFO] [stdout] 461 | | Some(e) => e, [INFO] [stdout] 462 | | None => return None, [INFO] [stdout] 463 | | }; [INFO] [stdout] | |_________^ help: try instead: `decoded.extra?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/protocols/vag.rs:523:20 [INFO] [stdout] | [INFO] [stdout] 523 | let key2 = (((block[7] as u16) << 8) | (dispatch as u16)) & 0xFFFF; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(((block[7] as u16) << 8) | (dispatch as u16))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/protocols/vag.rs:599:20 [INFO] [stdout] | [INFO] [stdout] 599 | let key2 = (((enc_block[7] as u16) << 8) | (dispatch as u16)) & 0xFFFF; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(((enc_block[7] as u16) << 8) | (dispatch as u16))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `eprintln!` args [INFO] [stdout] --> src/keystore/mod.rs:190:13 [INFO] [stdout] | [INFO] [stdout] 190 | eprintln!(" type {} {} {}", ty, format!("{:016X}", key), name); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `eprintln!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] = note: `#[warn(clippy::format_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/protocols/vag.rs:670:20 [INFO] [stdout] | [INFO] [stdout] 670 | let key2 = (((block[7] as u16) << 8) | (dispatch as u16)) & 0xFFFF; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(((block[7] as u16) << 8) | (dispatch as u16))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> src/protocols/common.rs:101:20 [INFO] [stdout] | [INFO] [stdout] 101 | Some(s) if s.is_empty() => return "UNKNOWN", [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] = note: `#[warn(clippy::redundant_guards)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 101 - Some(s) if s.is_empty() => return "UNKNOWN", [INFO] [stdout] 101 + Some("") => return "UNKNOWN", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:877:32 [INFO] [stdout] | [INFO] [stdout] 877 | let diff = if duration < TE_SHORT { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 878 | | TE_SHORT - duration [INFO] [stdout] 879 | | } else { [INFO] [stdout] 880 | | duration - TE_SHORT [INFO] [stdout] 881 | | }; [INFO] [stdout] | |_____________________^ help: replace with `abs_diff`: `TE_SHORT.abs_diff(duration)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:901:31 [INFO] [stdout] | [INFO] [stdout] 901 | let te_diff = if duration > TE_SHORT_12 { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 902 | | duration - TE_SHORT_12 [INFO] [stdout] 903 | | } else { [INFO] [stdout] 904 | | TE_SHORT_12 - duration [INFO] [stdout] 905 | | }; [INFO] [stdout] | |_________________^ help: replace with `abs_diff`: `duration.abs_diff(TE_SHORT_12)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:909:37 [INFO] [stdout] | [INFO] [stdout] 909 | let prev_diff = if self.te_last > TE_SHORT_12 { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 910 | | self.te_last - TE_SHORT_12 [INFO] [stdout] 911 | | } else { [INFO] [stdout] 912 | | TE_SHORT_12 - self.te_last [INFO] [stdout] 913 | | }; [INFO] [stdout] | |_____________________^ help: replace with `abs_diff`: `self.te_last.abs_diff(TE_SHORT_12)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:926:36 [INFO] [stdout] | [INFO] [stdout] 926 | let gap_diff = if duration < TE_LONG_12 { [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 927 | | TE_LONG_12 - duration [INFO] [stdout] 928 | | } else { [INFO] [stdout] 929 | | duration - TE_LONG_12 [INFO] [stdout] 930 | | }; [INFO] [stdout] | |_____________________^ help: replace with `abs_diff`: `TE_LONG_12.abs_diff(duration)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:932:41 [INFO] [stdout] | [INFO] [stdout] 932 | let prev_diff = if self.te_last > TE_SHORT_12 { [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 933 | | self.te_last - TE_SHORT_12 [INFO] [stdout] 934 | | } else { [INFO] [stdout] 935 | | TE_SHORT_12 - self.te_last [INFO] [stdout] 936 | | }; [INFO] [stdout] | |_________________________^ help: replace with `abs_diff`: `self.te_last.abs_diff(TE_SHORT_12)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/protocols/keeloq.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | //! Decryption tries all keystore keys with simple, normal, secure, magic_xor_type1, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 8 | //! Decryption tries all keystore keys with simple, normal, secure, magic_xor_type1, [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/protocols/keeloq.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | //! magic_serial type1/2/3 (and both key byte orders). Encoder uses simple learning [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 9 | //! magic_serial type1/2/3 (and both key byte orders). Encoder uses simple learning [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:950:38 [INFO] [stdout] | [INFO] [stdout] 950 | let short_diff = if duration > TE_SHORT_12 { [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 951 | | duration - TE_SHORT_12 [INFO] [stdout] 952 | | } else { [INFO] [stdout] 953 | | TE_SHORT_12 - duration [INFO] [stdout] 954 | | }; [INFO] [stdout] | |_____________________^ help: replace with `abs_diff`: `duration.abs_diff(TE_SHORT_12)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/protocols/keeloq.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | //! and the key stored in DecodedSignal::extra (set when decoded). [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 10 | //! and the key stored in DecodedSignal::extra (set when decoded). [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:955:37 [INFO] [stdout] | [INFO] [stdout] 955 | let long_diff = if duration > TE_LONG_12 { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 956 | | duration - TE_LONG_12 [INFO] [stdout] 957 | | } else { [INFO] [stdout] 958 | | TE_LONG_12 - duration [INFO] [stdout] 959 | | }; [INFO] [stdout] | |_____________________^ help: replace with `abs_diff`: `duration.abs_diff(TE_LONG_12)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/keeloq.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | / if a < b { [INFO] [stdout] 29 | | b - a [INFO] [stdout] 30 | | } else { [INFO] [stdout] 31 | | a - b [INFO] [stdout] 32 | | } [INFO] [stdout] | |_____^ help: replace with `abs_diff`: `b.abs_diff(a)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] = note: `#[warn(clippy::manual_abs_diff)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:1000:36 [INFO] [stdout] | [INFO] [stdout] 1000 | let gap_diff = if duration > 6000 { [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 1001 | | duration - 6000 [INFO] [stdout] 1002 | | } else { [INFO] [stdout] 1003 | | 6000 - duration [INFO] [stdout] 1004 | | }; [INFO] [stdout] | |_____________________^ help: replace with `abs_diff`: `duration.abs_diff(6000)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:1035:32 [INFO] [stdout] | [INFO] [stdout] 1035 | let diff = if duration < TE_SHORT { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 1036 | | TE_SHORT - duration [INFO] [stdout] 1037 | | } else { [INFO] [stdout] 1038 | | duration - TE_SHORT [INFO] [stdout] 1039 | | }; [INFO] [stdout] | |_____________________^ help: replace with `abs_diff`: `TE_SHORT.abs_diff(duration)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:1041:41 [INFO] [stdout] | [INFO] [stdout] 1041 | let prev_diff = if self.te_last < TE_SHORT { [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 1042 | | TE_SHORT - self.te_last [INFO] [stdout] 1043 | | } else { [INFO] [stdout] 1044 | | self.te_last - TE_SHORT [INFO] [stdout] 1045 | | }; [INFO] [stdout] | |_________________________^ help: replace with `abs_diff`: `TE_SHORT.abs_diff(self.te_last)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:1060:28 [INFO] [stdout] | [INFO] [stdout] 1060 | let diff = if duration < TE_LONG { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 1061 | | TE_LONG - duration [INFO] [stdout] 1062 | | } else { [INFO] [stdout] 1063 | | duration - TE_LONG [INFO] [stdout] 1064 | | }; [INFO] [stdout] | |_________________^ help: replace with `abs_diff`: `TE_LONG.abs_diff(duration)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:1068:33 [INFO] [stdout] | [INFO] [stdout] 1068 | let prev_diff = if self.te_last < TE_SHORT { [INFO] [stdout] | _________________________________^ [INFO] [stdout] 1069 | | TE_SHORT - self.te_last [INFO] [stdout] 1070 | | } else { [INFO] [stdout] 1071 | | self.te_last - TE_SHORT [INFO] [stdout] 1072 | | }; [INFO] [stdout] | |_________________^ help: replace with `abs_diff`: `TE_SHORT.abs_diff(self.te_last)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:1083:32 [INFO] [stdout] | [INFO] [stdout] 1083 | let diff = if duration < TE_SHORT { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 1084 | | TE_SHORT - duration [INFO] [stdout] 1085 | | } else { [INFO] [stdout] 1086 | | duration - TE_SHORT [INFO] [stdout] 1087 | | }; [INFO] [stdout] | |_____________________^ help: replace with `abs_diff`: `TE_SHORT.abs_diff(duration)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:1089:41 [INFO] [stdout] | [INFO] [stdout] 1089 | let prev_diff = if self.te_last < TE_LONG { [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 1090 | | TE_LONG - self.te_last [INFO] [stdout] 1091 | | } else { [INFO] [stdout] 1092 | | self.te_last - TE_LONG [INFO] [stdout] 1093 | | }; [INFO] [stdout] | |_________________________^ help: replace with `abs_diff`: `TE_LONG.abs_diff(self.te_last)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:1107:32 [INFO] [stdout] | [INFO] [stdout] 1107 | let diff = if duration < 750 { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 1108 | | 750 - duration [INFO] [stdout] 1109 | | } else { [INFO] [stdout] 1110 | | duration - 750 [INFO] [stdout] 1111 | | }; [INFO] [stdout] | |_____________________^ help: replace with `abs_diff`: `duration.abs_diff(750)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:1124:32 [INFO] [stdout] | [INFO] [stdout] 1124 | let diff = if duration < 750 { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 1125 | | 750 - duration [INFO] [stdout] 1126 | | } else { [INFO] [stdout] 1127 | | duration - 750 [INFO] [stdout] 1128 | | }; [INFO] [stdout] | |_____________________^ help: replace with `abs_diff`: `duration.abs_diff(750)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:1130:41 [INFO] [stdout] | [INFO] [stdout] 1130 | let prev_diff = if self.te_last < 750 { [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 1131 | | 750 - self.te_last [INFO] [stdout] 1132 | | } else { [INFO] [stdout] 1133 | | self.te_last - 750 [INFO] [stdout] 1134 | | }; [INFO] [stdout] | |_________________________^ help: replace with `abs_diff`: `self.te_last.abs_diff(750)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/protocols/vag.rs:1155:32 [INFO] [stdout] | [INFO] [stdout] 1155 | let event = if duration >= 380 && duration <= 620 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(380..=620).contains(&duration)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/protocols/vag.rs:1157:27 [INFO] [stdout] | [INFO] [stdout] 1157 | } else if duration >= 880 && duration <= 1120 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(880..=1120).contains(&duration)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/fiat_v0.rs:157:26 [INFO] [stdout] | [INFO] [stdout] 157 | let diff_short = if duration < TE_SHORT { [INFO] [stdout] | __________________________^ [INFO] [stdout] 158 | | TE_SHORT - duration [INFO] [stdout] 159 | | } else { [INFO] [stdout] 160 | | duration - TE_SHORT [INFO] [stdout] 161 | | }; [INFO] [stdout] | |_________^ help: replace with `abs_diff`: `TE_SHORT.abs_diff(duration)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/fiat_v0.rs:199:44 [INFO] [stdout] | [INFO] [stdout] 199 | ... let gap_diff = if duration < GAP_THRESHOLD { [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 200 | | ... GAP_THRESHOLD - duration [INFO] [stdout] 201 | | ... } else { [INFO] [stdout] 202 | | ... duration - GAP_THRESHOLD [INFO] [stdout] 203 | | ... }; [INFO] [stdout] | |_______________________^ help: replace with `abs_diff`: `GAP_THRESHOLD.abs_diff(duration)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/fiat_v0.rs:218:44 [INFO] [stdout] | [INFO] [stdout] 218 | ... let gap_diff = if duration < GAP_THRESHOLD { [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 219 | | ... GAP_THRESHOLD - duration [INFO] [stdout] 220 | | ... } else { [INFO] [stdout] 221 | | ... duration - GAP_THRESHOLD [INFO] [stdout] 222 | | ... }; [INFO] [stdout] | |_______________________^ help: replace with `abs_diff`: `GAP_THRESHOLD.abs_diff(duration)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `b` [INFO] [stdout] --> src/protocols/keeloq_generic.rs:64:18 [INFO] [stdout] | [INFO] [stdout] 64 | for i in 0..9 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 64 - for i in 0..9 { [INFO] [stdout] 64 + for in &mut b { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocols/suzuki.rs:124:21 [INFO] [stdout] | [INFO] [stdout] 124 | / if self.header_count >= 300 { [INFO] [stdout] 125 | | if duration_diff!(duration, TE_LONG) <= TE_DELTA { [INFO] [stdout] 126 | | self.step = DecoderStep::DecodeData; [INFO] [stdout] 127 | | self.add_bit(1); [INFO] [stdout] 128 | | } [INFO] [stdout] 129 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 124 ~ if self.header_count >= 300 [INFO] [stdout] 125 ~ && duration_diff!(duration, TE_LONG) <= TE_DELTA { [INFO] [stdout] 126 | self.step = DecoderStep::DecodeData; [INFO] [stdout] 127 | self.add_bit(1); [INFO] [stdout] 128 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `state` [INFO] [stdout] --> src/protocols/aut64.rs:112:14 [INFO] [stdout] | [INFO] [stdout] 112 | for i in 0..(AUT64_BLOCK_SIZE - 1) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 112 - for i in 0..(AUT64_BLOCK_SIZE - 1) { [INFO] [stdout] 112 + for (i, ) in state.iter().enumerate().take((AUT64_BLOCK_SIZE - 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/protocols/scher_khan.rs:175:44 [INFO] [stdout] | [INFO] [stdout] 175 | self.decode_data = (self.decode_data << 1) | 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((self.decode_data << 1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `reversed` [INFO] [stdout] --> src/protocols/aut64.rs:206:14 [INFO] [stdout] | [INFO] [stdout] 206 | for i in 0..len { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 206 - for i in 0..len { [INFO] [stdout] 206 + for (i, ) in reversed.iter_mut().enumerate().take(len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `box_in` [INFO] [stdout] --> src/protocols/aut64.rs:207:18 [INFO] [stdout] | [INFO] [stdout] 207 | for j in 0..len { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 207 - for j in 0..len { [INFO] [stdout] 207 + for (j, ) in box_in.iter().enumerate().take(len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/protocols/star_line.rs:153:28 [INFO] [stdout] | [INFO] [stdout] 153 | if decode_count_bit >= MIN_COUNT_BIT && decode_count_bit <= MIN_COUNT_BIT + 2 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(MIN_COUNT_BIT..=MIN_COUNT_BIT + 2).contains(&decode_count_bit)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/protocols/aut64.rs:310:5 [INFO] [stdout] | [INFO] [stdout] 310 | dest.index = src[0]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `protocols::aut64::Aut64Key { index: src[0], ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/protocols/aut64.rs:309:5 [INFO] [stdout] | [INFO] [stdout] 309 | let mut dest = Aut64Key::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/protocols/star_line.rs:173:43 [INFO] [stdout] | [INFO] [stdout] 173 | ... decode_data = (decode_data << 1) | 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((decode_data << 1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/protocols/keys.rs:49:1 [INFO] [stdout] | [INFO] [stdout] 49 | / impl Default for KeyStore { [INFO] [stdout] 50 | | fn default() -> Self { [INFO] [stdout] 51 | | Self { [INFO] [stdout] 52 | | kia_mf_key: 0, [INFO] [stdout] ... | [INFO] [stdout] 61 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 32 + #[derive(Default)] [INFO] [stdout] 33 | pub struct KeyStore { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/protocols/star_line.rs:288:48 [INFO] [stdout] | [INFO] [stdout] 288 | ... self.decode_data = (self.decode_data << 1) | 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((self.decode_data << 1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/protocols/star_line.rs:327:16 [INFO] [stdout] | [INFO] [stdout] 327 | | (((serial & 0xFF) as u32) << 16) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((serial & 0xFF))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/protocols/psa.rs:203:12 [INFO] [stdout] | [INFO] [stdout] 203 | if seed_byte >= 0x23 && seed_byte < 0x24 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0x23..0x24).contains(&seed_byte)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/protocols/psa.rs:213:25 [INFO] [stdout] | [INFO] [stdout] 213 | buffer[3] = (v0 >> 0) as u8; [INFO] [stdout] | ^^^^^^^^^ help: consider reducing it to: `v0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/protocols/psa.rs:217:25 [INFO] [stdout] | [INFO] [stdout] 217 | buffer[7] = (v1 >> 0) as u8; [INFO] [stdout] | ^^^^^^^^^ help: consider reducing it to: `v1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/protocols/psa.rs:233:12 [INFO] [stdout] | [INFO] [stdout] 233 | if seed_byte >= 0xF3 && seed_byte < 0xF4 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0xF3..0xF4).contains(&seed_byte)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/protocols/psa.rs:239:51 [INFO] [stdout] | [INFO] [stdout] 239 | let serial = ((v0 >> 8) & 0xFFFF00) | ((v0 & 0xFF) as u32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `(v0 & 0xFF)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocols/kia_v1.rs:195:17 [INFO] [stdout] | [INFO] [stdout] 195 | / if self.header_count > 70 { [INFO] [stdout] 196 | | if !level && is_short && duration_diff!(self.te_last, TE_LONG) < TE_DELTA { [INFO] [stdout] 197 | | self.decode_count_bit = 1; [INFO] [stdout] 198 | | self.decode_data = 1; // Add first bit [INFO] [stdout] ... | [INFO] [stdout] 202 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 195 ~ if self.header_count > 70 [INFO] [stdout] 196 ~ && !level && is_short && duration_diff!(self.te_last, TE_LONG) < TE_DELTA { [INFO] [stdout] 197 | self.decode_count_bit = 1; [INFO] [stdout] ... [INFO] [stdout] 200 | self.step = DecoderStep::DecodeData; [INFO] [stdout] 201 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/mod.rs:180:36 [INFO] [stdout] | [INFO] [stdout] 180 | let diff = if f > frequency { f - frequency } else { frequency - f }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with `abs_diff`: `f.abs_diff(frequency)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/mod.rs:232:36 [INFO] [stdout] | [INFO] [stdout] 232 | let diff = if f > frequency { f - frequency } else { frequency - f }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with `abs_diff`: `f.abs_diff(frequency)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/radio/demodulator.rs:320:26 [INFO] [stdout] | [INFO] [stdout] 320 | self.threshold = self.threshold.max(0.02).min(0.5); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `self.threshold.clamp(0.02, 0.5)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/radio/demodulator.rs:325:27 [INFO] [stdout] | [INFO] [stdout] 325 | self.hysteresis = ((self.high_level - self.low_level) * 0.10) [INFO] [stdout] | ___________________________^ [INFO] [stdout] 326 | | .max(0.01) [INFO] [stdout] 327 | | .min(0.08); [INFO] [stdout] | |______________________^ help: replace with clamp: `((self.high_level - self.low_level) * 0.10).clamp(0.01, 0.08)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/protocols/kia_v3_v4.rs:103:29 [INFO] [stdout] | [INFO] [stdout] 103 | let num_bytes = ((self.raw_bit_count + 7) / 8) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `self.raw_bit_count.div_ceil(8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `b` [INFO] [stdout] --> src/protocols/kia_v3_v4.rs:104:22 [INFO] [stdout] | [INFO] [stdout] 104 | for i in 0..num_bytes { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 104 - for i in 0..num_bytes { [INFO] [stdout] 104 + for in b.iter_mut().take(num_bytes) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/protocols/kia_v3_v4.rs:376:39 [INFO] [stdout] | [INFO] [stdout] 376 | raw_bytes[0] = Self::reverse8((encrypted >> 0) as u8); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider reducing it to: `encrypted` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/protocols/kia_v3_v4.rs:382:39 [INFO] [stdout] | [INFO] [stdout] 382 | raw_bytes[4] = Self::reverse8((serial_btn >> 0) as u8); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider reducing it to: `serial_btn` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `byte_idx` is used to index `raw_bytes` [INFO] [stdout] --> src/protocols/kia_v3_v4.rs:426:29 [INFO] [stdout] | [INFO] [stdout] 426 | for byte_idx in 0..9 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 426 - for byte_idx in 0..9 { [INFO] [stdout] 426 + for (byte_idx, ) in raw_bytes.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `keystore_bytes` [INFO] [stdout] --> src/protocols/kia_v5.rs:78:18 [INFO] [stdout] | [INFO] [stdout] 78 | for i in 0..8 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 78 - for i in 0..8 { [INFO] [stdout] 78 + for (i, ) in keystore_bytes.iter_mut().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/protocols/kia_v5.rs:101:21 [INFO] [stdout] | [INFO] [stdout] 101 | base = base << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `base <<= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/protocols/kia_v5.rs:104:28 [INFO] [stdout] | [INFO] [stdout] 104 | let temp = (s3 ^ s1) & 0xFF; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider reducing it to: `(s3 ^ s1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/protocols/kia_v5.rs:119:27 [INFO] [stdout] | [INFO] [stdout] 119 | let chk = (base ^ (r ^ temp)) & 0xFF; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(base ^ (r ^ temp))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/protocols/kia_v5.rs:129:9 [INFO] [stdout] | [INFO] [stdout] 129 | ((s0 as u16) + ((s1 as u16) << 8)) & 0xFFFF [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((s0 as u16) + ((s1 as u16) << 8))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/protocols/kia_v5.rs:269:24 [INFO] [stdout] | [INFO] [stdout] 269 | if (is_short && duration_diff!(self.te_last, TE_SHORT) < TE_DELTA) || [INFO] [stdout] | ________________________^ [INFO] [stdout] 270 | | (is_long && duration_diff!(self.te_last, TE_SHORT) < TE_DELTA) || [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] 269 - if (is_short && duration_diff!(self.te_last, TE_SHORT) < TE_DELTA) || [INFO] [stdout] 270 - (is_long && duration_diff!(self.te_last, TE_SHORT) < TE_DELTA) || [INFO] [stdout] 269 + if !(duration_diff!(self.te_last, TE_SHORT) >= TE_DELTA || !is_short && !is_long) || [INFO] [stdout] | [INFO] [stdout] 269 - if (is_short && duration_diff!(self.te_last, TE_SHORT) < TE_DELTA) || [INFO] [stdout] 270 - (is_long && duration_diff!(self.te_last, TE_SHORT) < TE_DELTA) || [INFO] [stdout] 269 + if (is_long || is_short) && duration_diff!(self.te_last, TE_SHORT) < TE_DELTA || [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like you are swapping elements of `state` manually [INFO] [stdout] --> src/protocols/kia_v6.rs:170:9 [INFO] [stdout] | [INFO] [stdout] 170 | / let temp = state[2]; [INFO] [stdout] 171 | | state[2] = state[10]; [INFO] [stdout] 172 | | state[10] = temp; [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stdout] = note: `#[warn(clippy::manual_swap)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 170 ~ let temp = state[2]; [INFO] [stdout] 171 + state.swap(2, 10); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like you are swapping elements of `state` manually [INFO] [stdout] --> src/protocols/kia_v6.rs:173:9 [INFO] [stdout] | [INFO] [stdout] 173 | / let temp = state[6]; [INFO] [stdout] 174 | | state[6] = state[14]; [INFO] [stdout] 175 | | state[14] = temp; [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 173 ~ let temp = state[6]; [INFO] [stdout] 174 + state.swap(6, 14); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `aes_key` [INFO] [stdout] --> src/protocols/kia_v6.rs:299:18 [INFO] [stdout] | [INFO] [stdout] 299 | for i in 0..8 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 299 - for i in 0..8 { [INFO] [stdout] 299 + for (i, ) in aes_key.iter_mut().enumerate().take(8) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocols/kia_v6.rs:450:17 [INFO] [stdout] | [INFO] [stdout] 450 | / if diff_long < TE_DELTA && diff_long < diff_short { [INFO] [stdout] 451 | | if self.header_count >= PREAMBLE_COUNT { [INFO] [stdout] 452 | | self.header_count = 0; [INFO] [stdout] 453 | | self.te_last = duration; [INFO] [stdout] ... | [INFO] [stdout] 457 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 450 ~ if diff_long < TE_DELTA && diff_long < diff_short [INFO] [stdout] 451 ~ && self.header_count >= PREAMBLE_COUNT { [INFO] [stdout] 452 | self.header_count = 0; [INFO] [stdout] ... [INFO] [stdout] 455 | return None; [INFO] [stdout] 456 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/radio/rtlsdr.rs:33:1 [INFO] [stdout] | [INFO] [stdout] 33 | / impl Default for TunerGainSetting { [INFO] [stdout] 34 | | fn default() -> Self { [INFO] [stdout] 35 | | Self { [INFO] [stdout] 36 | | gain_tenths_db: None, // auto [INFO] [stdout] ... | [INFO] [stdout] 39 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 28 + #[derive(Default)] [INFO] [stdout] 29 | struct TunerGainSetting { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `buf` [INFO] [stdout] --> src/protocols/ford_v0.rs:208:18 [INFO] [stdout] | [INFO] [stdout] 208 | for i in 0..8 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 208 - for i in 0..8 { [INFO] [stdout] 208 + for (i, ) in buf.iter_mut().enumerate().take(8) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `buf` [INFO] [stdout] --> src/protocols/ford_v0.rs:218:18 [INFO] [stdout] | [INFO] [stdout] 218 | for i in 0..8 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 218 - for i in 0..8 { [INFO] [stdout] 218 + for (i, ) in buf.iter_mut().enumerate().take(8) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `buf` [INFO] [stdout] --> src/protocols/ford_v0.rs:248:18 [INFO] [stdout] | [INFO] [stdout] 248 | for i in 0..8 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 248 - for i in 0..8 { [INFO] [stdout] 248 + for (i, ) in buf.iter_mut().enumerate().take(8) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `idx` is only used to index `buf` [INFO] [stdout] --> src/protocols/ford_v0.rs:273:20 [INFO] [stdout] | [INFO] [stdout] 273 | for idx in 1..limit { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 273 - for idx in 1..limit { [INFO] [stdout] 273 + for in buf.iter_mut().take(limit).skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/storage.rs:56:32 [INFO] [stdout] | [INFO] [stdout] 56 | fn default_for(config_dir: &PathBuf) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 56 - fn default_for(config_dir: &PathBuf) -> Self { [INFO] [stdout] 56 + fn default_for(config_dir: &Path) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/storage.rs:242:30 [INFO] [stdout] | [INFO] [stdout] 242 | return home.join(&s[2..]); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/storage.rs:240:5 [INFO] [stdout] | [INFO] [stdout] 240 | if s.starts_with("~/") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 240 ~ if let Some() = s.strip_prefix("~/") { [INFO] [stdout] 241 | if let Some(home) = dirs::home_dir() { [INFO] [stdout] 242 ~ return home.join(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/protocols/vag.rs:411:21 [INFO] [stdout] | [INFO] [stdout] 411 | return; [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] 410 - self.fill_from_decrypted(&block_copy, dispatch_byte); [INFO] [stdout] 411 - return; [INFO] [stdout] 410 + self.fill_from_decrypted(&block_copy, dispatch_byte); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/protocols/vag.rs:460:21 [INFO] [stdout] | [INFO] [stdout] 460 | let extra = match decoded.extra { [INFO] [stdout] | _____________________^ [INFO] [stdout] 461 | | Some(e) => e, [INFO] [stdout] 462 | | None => return None, [INFO] [stdout] 463 | | }; [INFO] [stdout] | |_________^ help: try instead: `decoded.extra?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/protocols/vag.rs:523:20 [INFO] [stdout] | [INFO] [stdout] 523 | let key2 = (((block[7] as u16) << 8) | (dispatch as u16)) & 0xFFFF; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(((block[7] as u16) << 8) | (dispatch as u16))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/protocols/vag.rs:599:20 [INFO] [stdout] | [INFO] [stdout] 599 | let key2 = (((enc_block[7] as u16) << 8) | (dispatch as u16)) & 0xFFFF; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(((enc_block[7] as u16) << 8) | (dispatch as u16))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/protocols/vag.rs:670:20 [INFO] [stdout] | [INFO] [stdout] 670 | let key2 = (((block[7] as u16) << 8) | (dispatch as u16)) & 0xFFFF; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(((block[7] as u16) << 8) | (dispatch as u16))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:877:32 [INFO] [stdout] | [INFO] [stdout] 877 | let diff = if duration < TE_SHORT { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 878 | | TE_SHORT - duration [INFO] [stdout] 879 | | } else { [INFO] [stdout] 880 | | duration - TE_SHORT [INFO] [stdout] 881 | | }; [INFO] [stdout] | |_____________________^ help: replace with `abs_diff`: `TE_SHORT.abs_diff(duration)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:901:31 [INFO] [stdout] | [INFO] [stdout] 901 | let te_diff = if duration > TE_SHORT_12 { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 902 | | duration - TE_SHORT_12 [INFO] [stdout] 903 | | } else { [INFO] [stdout] 904 | | TE_SHORT_12 - duration [INFO] [stdout] 905 | | }; [INFO] [stdout] | |_________________^ help: replace with `abs_diff`: `duration.abs_diff(TE_SHORT_12)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:909:37 [INFO] [stdout] | [INFO] [stdout] 909 | let prev_diff = if self.te_last > TE_SHORT_12 { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 910 | | self.te_last - TE_SHORT_12 [INFO] [stdout] 911 | | } else { [INFO] [stdout] 912 | | TE_SHORT_12 - self.te_last [INFO] [stdout] 913 | | }; [INFO] [stdout] | |_____________________^ help: replace with `abs_diff`: `self.te_last.abs_diff(TE_SHORT_12)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:926:36 [INFO] [stdout] | [INFO] [stdout] 926 | let gap_diff = if duration < TE_LONG_12 { [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 927 | | TE_LONG_12 - duration [INFO] [stdout] 928 | | } else { [INFO] [stdout] 929 | | duration - TE_LONG_12 [INFO] [stdout] 930 | | }; [INFO] [stdout] | |_____________________^ help: replace with `abs_diff`: `TE_LONG_12.abs_diff(duration)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:932:41 [INFO] [stdout] | [INFO] [stdout] 932 | let prev_diff = if self.te_last > TE_SHORT_12 { [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 933 | | self.te_last - TE_SHORT_12 [INFO] [stdout] 934 | | } else { [INFO] [stdout] 935 | | TE_SHORT_12 - self.te_last [INFO] [stdout] 936 | | }; [INFO] [stdout] | |_________________________^ help: replace with `abs_diff`: `self.te_last.abs_diff(TE_SHORT_12)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:950:38 [INFO] [stdout] | [INFO] [stdout] 950 | let short_diff = if duration > TE_SHORT_12 { [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 951 | | duration - TE_SHORT_12 [INFO] [stdout] 952 | | } else { [INFO] [stdout] 953 | | TE_SHORT_12 - duration [INFO] [stdout] 954 | | }; [INFO] [stdout] | |_____________________^ help: replace with `abs_diff`: `duration.abs_diff(TE_SHORT_12)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:955:37 [INFO] [stdout] | [INFO] [stdout] 955 | let long_diff = if duration > TE_LONG_12 { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 956 | | duration - TE_LONG_12 [INFO] [stdout] 957 | | } else { [INFO] [stdout] 958 | | TE_LONG_12 - duration [INFO] [stdout] 959 | | }; [INFO] [stdout] | |_____________________^ help: replace with `abs_diff`: `duration.abs_diff(TE_LONG_12)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:1000:36 [INFO] [stdout] | [INFO] [stdout] 1000 | let gap_diff = if duration > 6000 { [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 1001 | | duration - 6000 [INFO] [stdout] 1002 | | } else { [INFO] [stdout] 1003 | | 6000 - duration [INFO] [stdout] 1004 | | }; [INFO] [stdout] | |_____________________^ help: replace with `abs_diff`: `duration.abs_diff(6000)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:1035:32 [INFO] [stdout] | [INFO] [stdout] 1035 | let diff = if duration < TE_SHORT { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 1036 | | TE_SHORT - duration [INFO] [stdout] 1037 | | } else { [INFO] [stdout] 1038 | | duration - TE_SHORT [INFO] [stdout] 1039 | | }; [INFO] [stdout] | |_____________________^ help: replace with `abs_diff`: `TE_SHORT.abs_diff(duration)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:1041:41 [INFO] [stdout] | [INFO] [stdout] 1041 | let prev_diff = if self.te_last < TE_SHORT { [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 1042 | | TE_SHORT - self.te_last [INFO] [stdout] 1043 | | } else { [INFO] [stdout] 1044 | | self.te_last - TE_SHORT [INFO] [stdout] 1045 | | }; [INFO] [stdout] | |_________________________^ help: replace with `abs_diff`: `TE_SHORT.abs_diff(self.te_last)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:1060:28 [INFO] [stdout] | [INFO] [stdout] 1060 | let diff = if duration < TE_LONG { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 1061 | | TE_LONG - duration [INFO] [stdout] 1062 | | } else { [INFO] [stdout] 1063 | | duration - TE_LONG [INFO] [stdout] 1064 | | }; [INFO] [stdout] | |_________________^ help: replace with `abs_diff`: `TE_LONG.abs_diff(duration)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:1068:33 [INFO] [stdout] | [INFO] [stdout] 1068 | let prev_diff = if self.te_last < TE_SHORT { [INFO] [stdout] | _________________________________^ [INFO] [stdout] 1069 | | TE_SHORT - self.te_last [INFO] [stdout] 1070 | | } else { [INFO] [stdout] 1071 | | self.te_last - TE_SHORT [INFO] [stdout] 1072 | | }; [INFO] [stdout] | |_________________^ help: replace with `abs_diff`: `TE_SHORT.abs_diff(self.te_last)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:1083:32 [INFO] [stdout] | [INFO] [stdout] 1083 | let diff = if duration < TE_SHORT { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 1084 | | TE_SHORT - duration [INFO] [stdout] 1085 | | } else { [INFO] [stdout] 1086 | | duration - TE_SHORT [INFO] [stdout] 1087 | | }; [INFO] [stdout] | |_____________________^ help: replace with `abs_diff`: `TE_SHORT.abs_diff(duration)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:1089:41 [INFO] [stdout] | [INFO] [stdout] 1089 | let prev_diff = if self.te_last < TE_LONG { [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 1090 | | TE_LONG - self.te_last [INFO] [stdout] 1091 | | } else { [INFO] [stdout] 1092 | | self.te_last - TE_LONG [INFO] [stdout] 1093 | | }; [INFO] [stdout] | |_________________________^ help: replace with `abs_diff`: `TE_LONG.abs_diff(self.te_last)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:1107:32 [INFO] [stdout] | [INFO] [stdout] 1107 | let diff = if duration < 750 { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 1108 | | 750 - duration [INFO] [stdout] 1109 | | } else { [INFO] [stdout] 1110 | | duration - 750 [INFO] [stdout] 1111 | | }; [INFO] [stdout] | |_____________________^ help: replace with `abs_diff`: `duration.abs_diff(750)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:1124:32 [INFO] [stdout] | [INFO] [stdout] 1124 | let diff = if duration < 750 { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 1125 | | 750 - duration [INFO] [stdout] 1126 | | } else { [INFO] [stdout] 1127 | | duration - 750 [INFO] [stdout] 1128 | | }; [INFO] [stdout] | |_____________________^ help: replace with `abs_diff`: `duration.abs_diff(750)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/vag.rs:1130:41 [INFO] [stdout] | [INFO] [stdout] 1130 | let prev_diff = if self.te_last < 750 { [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 1131 | | 750 - self.te_last [INFO] [stdout] 1132 | | } else { [INFO] [stdout] 1133 | | self.te_last - 750 [INFO] [stdout] 1134 | | }; [INFO] [stdout] | |_________________________^ help: replace with `abs_diff`: `self.te_last.abs_diff(750)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/protocols/vag.rs:1155:32 [INFO] [stdout] | [INFO] [stdout] 1155 | let event = if duration >= 380 && duration <= 620 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(380..=620).contains(&duration)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/protocols/vag.rs:1157:27 [INFO] [stdout] | [INFO] [stdout] 1157 | } else if duration >= 880 && duration <= 1120 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(880..=1120).contains(&duration)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/fiat_v0.rs:157:26 [INFO] [stdout] | [INFO] [stdout] 157 | let diff_short = if duration < TE_SHORT { [INFO] [stdout] | __________________________^ [INFO] [stdout] 158 | | TE_SHORT - duration [INFO] [stdout] 159 | | } else { [INFO] [stdout] 160 | | duration - TE_SHORT [INFO] [stdout] 161 | | }; [INFO] [stdout] | |_________^ help: replace with `abs_diff`: `TE_SHORT.abs_diff(duration)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/fiat_v0.rs:199:44 [INFO] [stdout] | [INFO] [stdout] 199 | ... let gap_diff = if duration < GAP_THRESHOLD { [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 200 | | ... GAP_THRESHOLD - duration [INFO] [stdout] 201 | | ... } else { [INFO] [stdout] 202 | | ... duration - GAP_THRESHOLD [INFO] [stdout] 203 | | ... }; [INFO] [stdout] | |_______________________^ help: replace with `abs_diff`: `GAP_THRESHOLD.abs_diff(duration)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/fiat_v0.rs:218:44 [INFO] [stdout] | [INFO] [stdout] 218 | ... let gap_diff = if duration < GAP_THRESHOLD { [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 219 | | ... GAP_THRESHOLD - duration [INFO] [stdout] 220 | | ... } else { [INFO] [stdout] 221 | | ... duration - GAP_THRESHOLD [INFO] [stdout] 222 | | ... }; [INFO] [stdout] | |_______________________^ help: replace with `abs_diff`: `GAP_THRESHOLD.abs_diff(duration)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocols/suzuki.rs:124:21 [INFO] [stdout] | [INFO] [stdout] 124 | / if self.header_count >= 300 { [INFO] [stdout] 125 | | if duration_diff!(duration, TE_LONG) <= TE_DELTA { [INFO] [stdout] 126 | | self.step = DecoderStep::DecodeData; [INFO] [stdout] 127 | | self.add_bit(1); [INFO] [stdout] 128 | | } [INFO] [stdout] 129 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 124 ~ if self.header_count >= 300 [INFO] [stdout] 125 ~ && duration_diff!(duration, TE_LONG) <= TE_DELTA { [INFO] [stdout] 126 | self.step = DecoderStep::DecodeData; [INFO] [stdout] 127 | self.add_bit(1); [INFO] [stdout] 128 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/protocols/scher_khan.rs:175:44 [INFO] [stdout] | [INFO] [stdout] 175 | self.decode_data = (self.decode_data << 1) | 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((self.decode_data << 1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/protocols/star_line.rs:153:28 [INFO] [stdout] | [INFO] [stdout] 153 | if decode_count_bit >= MIN_COUNT_BIT && decode_count_bit <= MIN_COUNT_BIT + 2 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(MIN_COUNT_BIT..=MIN_COUNT_BIT + 2).contains(&decode_count_bit)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/protocols/star_line.rs:173:43 [INFO] [stdout] | [INFO] [stdout] 173 | ... decode_data = (decode_data << 1) | 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((decode_data << 1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/protocols/star_line.rs:288:48 [INFO] [stdout] | [INFO] [stdout] 288 | ... self.decode_data = (self.decode_data << 1) | 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((self.decode_data << 1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/protocols/star_line.rs:327:16 [INFO] [stdout] | [INFO] [stdout] 327 | | (((serial & 0xFF) as u32) << 16) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((serial & 0xFF))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/vuln_db.rs:330:8 [INFO] [stdout] | [INFO] [stdout] 330 | if list.iter().any(|s| *s == "ALL") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `list.contains(&"ALL")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] = note: `#[warn(clippy::manual_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/protocols/psa.rs:203:12 [INFO] [stdout] | [INFO] [stdout] 203 | if seed_byte >= 0x23 && seed_byte < 0x24 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0x23..0x24).contains(&seed_byte)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/protocols/psa.rs:213:25 [INFO] [stdout] | [INFO] [stdout] 213 | buffer[3] = (v0 >> 0) as u8; [INFO] [stdout] | ^^^^^^^^^ help: consider reducing it to: `v0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/protocols/psa.rs:217:25 [INFO] [stdout] | [INFO] [stdout] 217 | buffer[7] = (v1 >> 0) as u8; [INFO] [stdout] | ^^^^^^^^^ help: consider reducing it to: `v1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/protocols/psa.rs:233:12 [INFO] [stdout] | [INFO] [stdout] 233 | if seed_byte >= 0xF3 && seed_byte < 0xF4 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0xF3..0xF4).contains(&seed_byte)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:147:33 [INFO] [stdout] | [INFO] [stdout] 147 | / ... if app.selected_capture.is_some() && !app.captures.is_empty() { [INFO] [stdout] 148 | | ... app.input_mode = InputMode::SignalMenu; [INFO] [stdout] 149 | | ... app.signal_menu_index = 0; [INFO] [stdout] 150 | | ... } [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] 145 ~ KeyCode::Enter [INFO] [stdout] 146 | // Open signal action menu if a capture is selected [INFO] [stdout] 147 ~ if app.selected_capture.is_some() && !app.captures.is_empty() => { [INFO] [stdout] 148 | app.input_mode = InputMode::SignalMenu; [INFO] [stdout] 149 | app.signal_menu_index = 0; [INFO] [stdout] 150 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/protocols/psa.rs:239:51 [INFO] [stdout] | [INFO] [stdout] 239 | let serial = ((v0 >> 8) & 0xFFFF00) | ((v0 & 0xFF) as u32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `(v0 & 0xFF)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:199:33 [INFO] [stdout] | [INFO] [stdout] 199 | / ... if app.signal_menu_index > 0 { [INFO] [stdout] 200 | | ... app.signal_menu_index -= 1; [INFO] [stdout] 201 | | ... } [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] 198 ~ KeyCode::Up | KeyCode::Char('k') [INFO] [stdout] 199 ~ if app.signal_menu_index > 0 => { [INFO] [stdout] 200 | app.signal_menu_index -= 1; [INFO] [stdout] 201 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:229:33 [INFO] [stdout] | [INFO] [stdout] 229 | / ... if app.settings_field_index > 0 { [INFO] [stdout] 230 | | ... app.settings_field_index -= 1; [INFO] [stdout] 231 | | ... } [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] 228 ~ KeyCode::Left | KeyCode::Char('h') [INFO] [stdout] 229 ~ if app.settings_field_index > 0 => { [INFO] [stdout] 230 | app.settings_field_index -= 1; [INFO] [stdout] 231 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:234:33 [INFO] [stdout] | [INFO] [stdout] 234 | / ... if app.settings_field_index < SettingsField::ALL.len() - 1 { [INFO] [stdout] 235 | | ... app.settings_field_index += 1; [INFO] [stdout] 236 | | ... } [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] 233 ~ KeyCode::Right | KeyCode::Char('l') [INFO] [stdout] 234 ~ if app.settings_field_index < SettingsField::ALL.len() - 1 => { [INFO] [stdout] 235 | app.settings_field_index += 1; [INFO] [stdout] 236 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:256:33 [INFO] [stdout] | [INFO] [stdout] 256 | / ... if app.settings_value_index > 0 { [INFO] [stdout] 257 | | ... app.settings_value_index -= 1; [INFO] [stdout] 258 | | ... } [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] 255 ~ KeyCode::Up | KeyCode::Char('k') [INFO] [stdout] 256 ~ if app.settings_value_index > 0 => { [INFO] [stdout] 257 | app.settings_value_index -= 1; [INFO] [stdout] 258 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:320:33 [INFO] [stdout] | [INFO] [stdout] 320 | / ... if c.is_alphanumeric() || c == '_' || c == '-' || c == '.' { [INFO] [stdout] 321 | | ... app.export_filename.push(c); [INFO] [stdout] 322 | | ... } [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] 318 ~ KeyCode::Char(c) [INFO] [stdout] 319 | // Allow filesystem-safe characters [INFO] [stdout] 320 ~ if (c.is_alphanumeric() || c == '_' || c == '-' || c == '.') => { [INFO] [stdout] 321 | app.export_filename.push(c); [INFO] [stdout] 322 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:341:33 [INFO] [stdout] | [INFO] [stdout] 341 | / ... if app.fob_meta_year.len() < 4 { [INFO] [stdout] 342 | | ... app.fob_meta_year.push(c); [INFO] [stdout] 343 | | ... } [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] 340 ~ KeyCode::Char(c) if c.is_ascii_digit() [INFO] [stdout] 341 ~ && app.fob_meta_year.len() < 4 => { [INFO] [stdout] 342 | app.fob_meta_year.push(c); [INFO] [stdout] 343 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:452:33 [INFO] [stdout] | [INFO] [stdout] 452 | / ... if app.capture_meta_year.len() < 4 { [INFO] [stdout] 453 | | ... app.capture_meta_year.push(c); [INFO] [stdout] 454 | | ... } [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] 451 ~ KeyCode::Char(c) if c.is_ascii_digit() [INFO] [stdout] 452 ~ && app.capture_meta_year.len() < 4 => { [INFO] [stdout] 453 | app.capture_meta_year.push(c); [INFO] [stdout] 454 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:535:33 [INFO] [stdout] | [INFO] [stdout] 535 | / ... if app.load_browser_selected > 0 { [INFO] [stdout] 536 | | ... app.load_browser_selected -= 1; [INFO] [stdout] 537 | | ... if app.load_browser_selected < app.load_browser_scroll { [INFO] [stdout] 538 | | ... app.load_browser_scroll = app.load_browser_selected; [INFO] [stdout] 539 | | ... } [INFO] [stdout] 540 | | ... } [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] 534 ~ KeyCode::Up | KeyCode::Char('k') [INFO] [stdout] 535 ~ if app.load_browser_selected > 0 => { [INFO] [stdout] 536 | app.load_browser_selected -= 1; [INFO] [stdout] ... [INFO] [stdout] 539 | } [INFO] [stdout] 540 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/mod.rs:180:36 [INFO] [stdout] | [INFO] [stdout] 180 | let diff = if f > frequency { f - frequency } else { frequency - f }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with `abs_diff`: `f.abs_diff(frequency)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/protocols/mod.rs:232:36 [INFO] [stdout] | [INFO] [stdout] 232 | let diff = if f > frequency { f - frequency } else { frequency - f }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with `abs_diff`: `f.abs_diff(frequency)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/radio/demodulator.rs:320:26 [INFO] [stdout] | [INFO] [stdout] 320 | self.threshold = self.threshold.max(0.02).min(0.5); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `self.threshold.clamp(0.02, 0.5)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/radio/demodulator.rs:325:27 [INFO] [stdout] | [INFO] [stdout] 325 | self.hysteresis = ((self.high_level - self.low_level) * 0.10) [INFO] [stdout] | ___________________________^ [INFO] [stdout] 326 | | .max(0.01) [INFO] [stdout] 327 | | .min(0.08); [INFO] [stdout] | |______________________^ help: replace with clamp: `((self.high_level - self.low_level) * 0.10).clamp(0.01, 0.08)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/radio/rtlsdr.rs:33:1 [INFO] [stdout] | [INFO] [stdout] 33 | / impl Default for TunerGainSetting { [INFO] [stdout] 34 | | fn default() -> Self { [INFO] [stdout] 35 | | Self { [INFO] [stdout] 36 | | gain_tenths_db: None, // auto [INFO] [stdout] ... | [INFO] [stdout] 39 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 28 + #[derive(Default)] [INFO] [stdout] 29 | struct TunerGainSetting { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/storage.rs:56:32 [INFO] [stdout] | [INFO] [stdout] 56 | fn default_for(config_dir: &PathBuf) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 56 - fn default_for(config_dir: &PathBuf) -> Self { [INFO] [stdout] 56 + fn default_for(config_dir: &Path) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/storage.rs:242:30 [INFO] [stdout] | [INFO] [stdout] 242 | return home.join(&s[2..]); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/storage.rs:240:5 [INFO] [stdout] | [INFO] [stdout] 240 | if s.starts_with("~/") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 240 ~ if let Some() = s.strip_prefix("~/") { [INFO] [stdout] 241 | if let Some(home) = dirs::home_dir() { [INFO] [stdout] 242 ~ return home.join(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/vuln_db.rs:330:8 [INFO] [stdout] | [INFO] [stdout] 330 | if list.iter().any(|s| *s == "ALL") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `list.contains(&"ALL")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] = note: `#[warn(clippy::manual_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:147:33 [INFO] [stdout] | [INFO] [stdout] 147 | / ... if app.selected_capture.is_some() && !app.captures.is_empty() { [INFO] [stdout] 148 | | ... app.input_mode = InputMode::SignalMenu; [INFO] [stdout] 149 | | ... app.signal_menu_index = 0; [INFO] [stdout] 150 | | ... } [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] 145 ~ KeyCode::Enter [INFO] [stdout] 146 | // Open signal action menu if a capture is selected [INFO] [stdout] 147 ~ if app.selected_capture.is_some() && !app.captures.is_empty() => { [INFO] [stdout] 148 | app.input_mode = InputMode::SignalMenu; [INFO] [stdout] 149 | app.signal_menu_index = 0; [INFO] [stdout] 150 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:199:33 [INFO] [stdout] | [INFO] [stdout] 199 | / ... if app.signal_menu_index > 0 { [INFO] [stdout] 200 | | ... app.signal_menu_index -= 1; [INFO] [stdout] 201 | | ... } [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] 198 ~ KeyCode::Up | KeyCode::Char('k') [INFO] [stdout] 199 ~ if app.signal_menu_index > 0 => { [INFO] [stdout] 200 | app.signal_menu_index -= 1; [INFO] [stdout] 201 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:229:33 [INFO] [stdout] | [INFO] [stdout] 229 | / ... if app.settings_field_index > 0 { [INFO] [stdout] 230 | | ... app.settings_field_index -= 1; [INFO] [stdout] 231 | | ... } [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] 228 ~ KeyCode::Left | KeyCode::Char('h') [INFO] [stdout] 229 ~ if app.settings_field_index > 0 => { [INFO] [stdout] 230 | app.settings_field_index -= 1; [INFO] [stdout] 231 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:234:33 [INFO] [stdout] | [INFO] [stdout] 234 | / ... if app.settings_field_index < SettingsField::ALL.len() - 1 { [INFO] [stdout] 235 | | ... app.settings_field_index += 1; [INFO] [stdout] 236 | | ... } [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] 233 ~ KeyCode::Right | KeyCode::Char('l') [INFO] [stdout] 234 ~ if app.settings_field_index < SettingsField::ALL.len() - 1 => { [INFO] [stdout] 235 | app.settings_field_index += 1; [INFO] [stdout] 236 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:256:33 [INFO] [stdout] | [INFO] [stdout] 256 | / ... if app.settings_value_index > 0 { [INFO] [stdout] 257 | | ... app.settings_value_index -= 1; [INFO] [stdout] 258 | | ... } [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] 255 ~ KeyCode::Up | KeyCode::Char('k') [INFO] [stdout] 256 ~ if app.settings_value_index > 0 => { [INFO] [stdout] 257 | app.settings_value_index -= 1; [INFO] [stdout] 258 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:320:33 [INFO] [stdout] | [INFO] [stdout] 320 | / ... if c.is_alphanumeric() || c == '_' || c == '-' || c == '.' { [INFO] [stdout] 321 | | ... app.export_filename.push(c); [INFO] [stdout] 322 | | ... } [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] 318 ~ KeyCode::Char(c) [INFO] [stdout] 319 | // Allow filesystem-safe characters [INFO] [stdout] 320 ~ if (c.is_alphanumeric() || c == '_' || c == '-' || c == '.') => { [INFO] [stdout] 321 | app.export_filename.push(c); [INFO] [stdout] 322 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:341:33 [INFO] [stdout] | [INFO] [stdout] 341 | / ... if app.fob_meta_year.len() < 4 { [INFO] [stdout] 342 | | ... app.fob_meta_year.push(c); [INFO] [stdout] 343 | | ... } [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] 340 ~ KeyCode::Char(c) if c.is_ascii_digit() [INFO] [stdout] 341 ~ && app.fob_meta_year.len() < 4 => { [INFO] [stdout] 342 | app.fob_meta_year.push(c); [INFO] [stdout] 343 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:452:33 [INFO] [stdout] | [INFO] [stdout] 452 | / ... if app.capture_meta_year.len() < 4 { [INFO] [stdout] 453 | | ... app.capture_meta_year.push(c); [INFO] [stdout] 454 | | ... } [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] 451 ~ KeyCode::Char(c) if c.is_ascii_digit() [INFO] [stdout] 452 ~ && app.capture_meta_year.len() < 4 => { [INFO] [stdout] 453 | app.capture_meta_year.push(c); [INFO] [stdout] 454 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:535:33 [INFO] [stdout] | [INFO] [stdout] 535 | / ... if app.load_browser_selected > 0 { [INFO] [stdout] 536 | | ... app.load_browser_selected -= 1; [INFO] [stdout] 537 | | ... if app.load_browser_selected < app.load_browser_scroll { [INFO] [stdout] 538 | | ... app.load_browser_scroll = app.load_browser_selected; [INFO] [stdout] 539 | | ... } [INFO] [stdout] 540 | | ... } [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] 534 ~ KeyCode::Up | KeyCode::Char('k') [INFO] [stdout] 535 ~ if app.load_browser_selected > 0 => { [INFO] [stdout] 536 | app.load_browser_selected -= 1; [INFO] [stdout] ... [INFO] [stdout] 539 | } [INFO] [stdout] 540 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/radio/demodulator.rs:563:32 [INFO] [stdout] | [INFO] [stdout] 563 | let gap_buf: Vec = vec![1, 0].repeat(80_000); // 80ms LOW [INFO] [stdout] | ^^^^^^^^^^ help: you can use an array directly: `[1, 0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 39.37s [INFO] running `Command { std: "docker" "inspect" "657385bd436bf1e7df3c83f82a453f6a686c111a896eb1e30b2acd425c7cd83a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "657385bd436bf1e7df3c83f82a453f6a686c111a896eb1e30b2acd425c7cd83a", kill_on_drop: false }` [INFO] [stdout] 657385bd436bf1e7df3c83f82a453f6a686c111a896eb1e30b2acd425c7cd83a