[INFO] cloning repository https://github.com/cstrahan/syl-2381 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/cstrahan/syl-2381" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcstrahan%2Fsyl-2381", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcstrahan%2Fsyl-2381'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] a0e3cc7eed53e5b144fb9db28a7636aad065e6ec [INFO] linting cstrahan/syl-2381 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcstrahan%2Fsyl-2381" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/cstrahan/syl-2381 [INFO] removed 0 missing examples [INFO] finished tweaking git repo https://github.com/cstrahan/syl-2381 [INFO] tweaked toml for git repo https://github.com/cstrahan/syl-2381 written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/cstrahan/syl-2381 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/cstrahan/syl-2381 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 libudev v0.3.0 [INFO] [stderr] Downloaded embedded-hal-nb v1.0.0-alpha.3 [INFO] [stderr] Downloaded CoreFoundation-sys v0.1.4 [INFO] [stderr] Downloaded embedded-hal v1.0.0-alpha.11 [INFO] [stderr] Downloaded rmodbus v0.7.4 [INFO] [stderr] Downloaded bitflags v2.0.2 [INFO] [stderr] Downloaded serialport v4.2.1 [INFO] [stderr] Downloaded mach v0.1.2 [INFO] [stderr] Downloaded IOKit-sys v0.1.5 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 8d2e05d14b739f96245a562268f28134b2e11bcd97a75bdae8ef95d87a0b86cb [INFO] running `Command { std: "docker" "start" "-a" "8d2e05d14b739f96245a562268f28134b2e11bcd97a75bdae8ef95d87a0b86cb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "8d2e05d14b739f96245a562268f28134b2e11bcd97a75bdae8ef95d87a0b86cb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8d2e05d14b739f96245a562268f28134b2e11bcd97a75bdae8ef95d87a0b86cb", kill_on_drop: false }` [INFO] [stdout] 8d2e05d14b739f96245a562268f28134b2e11bcd97a75bdae8ef95d87a0b86cb [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 9ed1915cbbd2629907ade40f9664ff304c70234ce65014d5021b3d9bc28eb03e [INFO] running `Command { std: "docker" "start" "-a" "9ed1915cbbd2629907ade40f9664ff304c70234ce65014d5021b3d9bc28eb03e", kill_on_drop: false }` [INFO] [stderr] Compiling semver v1.0.18 [INFO] [stderr] Checking nb v1.1.0 [INFO] [stderr] Checking byteorder v1.4.3 [INFO] [stderr] Checking stable_deref_trait v1.2.0 [INFO] [stderr] Checking embedded-hal v1.0.0-alpha.11 [INFO] [stderr] Checking bitflags v2.0.2 [INFO] [stderr] Checking ieee754 v0.2.6 [INFO] [stderr] Compiling libudev-sys v0.1.4 [INFO] [stderr] Checking lock_api v0.4.10 [INFO] [stderr] Checking nix v0.26.2 [INFO] [stderr] Checking nb v0.1.3 [INFO] [stderr] Checking embedded-hal-nb v1.0.0-alpha.3 [INFO] [stderr] Checking embedded-hal v0.2.7 [INFO] [stderr] Checking hash32 v0.2.1 [INFO] [stderr] Checking spin v0.9.8 [INFO] [stderr] Checking libudev v0.3.0 [INFO] [stderr] Compiling rustc_version v0.4.0 [INFO] [stderr] Compiling heapless v0.7.16 [INFO] [stderr] Checking rmodbus v0.7.4 [INFO] [stderr] Checking serialport v4.2.1 [INFO] [stderr] Checking syl2381 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:455:13 [INFO] [stdout] | [INFO] [stdout] 455 | unit_id: unit_id, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `unit_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:456:13 [INFO] [stdout] | [INFO] [stdout] 456 | port: port, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `port` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/lib.rs:809:5 [INFO] [stdout] | [INFO] [stdout] 809 | / /// --------------------------- [INFO] [stdout] 810 | | [INFO] [stdout] | |_^ [INFO] [stdout] ... [INFO] [stdout] 815 | fn set_holding(&mut self, reg: u16, val: f32) -> Result<(), UART> { [INFO] [stdout] | -------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the documentation should include the empty line include it in the comment [INFO] [stdout] | [INFO] [stdout] 810 | /// [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:455:13 [INFO] [stdout] | [INFO] [stdout] 455 | unit_id: unit_id, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `unit_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:456:13 [INFO] [stdout] | [INFO] [stdout] 456 | port: port, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `port` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/lib.rs:809:5 [INFO] [stdout] | [INFO] [stdout] 809 | / /// --------------------------- [INFO] [stdout] 810 | | [INFO] [stdout] | |_^ [INFO] [stdout] ... [INFO] [stdout] 815 | fn set_holding(&mut self, reg: u16, val: f32) -> Result<(), UART> { [INFO] [stdout] | -------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the documentation should include the empty line include it in the comment [INFO] [stdout] | [INFO] [stdout] 810 | /// [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:91:35 [INFO] [stdout] | [INFO] [stdout] 91 | ::fmt(&self, f) [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:129:35 [INFO] [stdout] | [INFO] [stdout] 129 | ::fmt(&self, f) [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:164:35 [INFO] [stdout] | [INFO] [stdout] 164 | ::fmt(&self, f) [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:199:35 [INFO] [stdout] | [INFO] [stdout] 199 | ::fmt(&self, f) [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:241:35 [INFO] [stdout] | [INFO] [stdout] 241 | ::fmt(&self, f) [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:324:35 [INFO] [stdout] | [INFO] [stdout] 324 | ::fmt(&self, f) [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:375:35 [INFO] [stdout] | [INFO] [stdout] 375 | ::fmt(&self, f) [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:428:35 [INFO] [stdout] | [INFO] [stdout] 428 | ::fmt(&self, f) [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/lib.rs:475:13 [INFO] [stdout] | [INFO] [stdout] 475 | if !(val >= 0.0 && val <= 1.0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&val)` [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: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/lib.rs:531:13 [INFO] [stdout] | [INFO] [stdout] 531 | if !(val >= -1999 && val <= 9999) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-1999..=9999).contains(&val)` [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/lib.rs:546:13 [INFO] [stdout] | [INFO] [stdout] 546 | if !(val >= -1999 && val <= 9999) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-1999..=9999).contains(&val)` [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/lib.rs:561:13 [INFO] [stdout] | [INFO] [stdout] 561 | if !(val >= -1999 && val <= 9999) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-1999..=9999).contains(&val)` [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/lib.rs:575:13 [INFO] [stdout] | [INFO] [stdout] 575 | if !(val >= -0.1 && val <= 9999.9) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-0.1..=9999.9).contains(&val)` [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/lib.rs:589:13 [INFO] [stdout] | [INFO] [stdout] 589 | if !(val >= 2 && val <= 1999) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(2..=1999).contains(&val)` [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 boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:604:12 [INFO] [stdout] | [INFO] [stdout] 604 | if !(val <= 999) { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `(val > 999)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/lib.rs:619:13 [INFO] [stdout] | [INFO] [stdout] 619 | if !(val >= 1 && val <= 1999) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1..=1999).contains(&val)` [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/lib.rs:643:13 [INFO] [stdout] | [INFO] [stdout] 643 | if !(val >= 0.0 && val <= 1.0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&val)` [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 (`f32` -> `f32`) [INFO] [stdout] --> src/lib.rs:644:47 [INFO] [stdout] | [INFO] [stdout] 644 | return Err(Error::UnexpectedValue(val as f32)); [INFO] [stdout] | ^^^^^^^^^^ help: try: `val` [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 `RangeInclusive::contains` implementation [INFO] [stdout] --> src/lib.rs:663:13 [INFO] [stdout] | [INFO] [stdout] 663 | if !(val >= 1 && val <= 500) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1..=500).contains(&val)` [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 boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:734:12 [INFO] [stdout] | [INFO] [stdout] 734 | if !(val <= 9999) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `(val > 9999)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/lib.rs:749:13 [INFO] [stdout] | [INFO] [stdout] 749 | if !(val >= -1000 && val <= 1000) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-1000..=1000).contains(&val)` [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 boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:790:12 [INFO] [stdout] | [INFO] [stdout] 790 | if !(val <= 64) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `(val > 64)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `buf` [INFO] [stdout] --> src/lib.rs:923:18 [INFO] [stdout] | [INFO] [stdout] 923 | for i in 0..buf.len() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 923 - for i in 0..buf.len() { [INFO] [stdout] 923 + for in &mut buf { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/lib.rs:924:58 [INFO] [stdout] | [INFO] [stdout] 924 | let b = nb::block!(self.port.read()).map_err(|err| Error::SerialError(err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::SerialError` [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: redundant closure [INFO] [stdout] --> src/lib.rs:932:52 [INFO] [stdout] | [INFO] [stdout] 932 | nb::block!(self.port.write(b)).map_err(|err| Error::SerialError(err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::SerialError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:91:35 [INFO] [stdout] | [INFO] [stdout] 91 | ::fmt(&self, f) [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:129:35 [INFO] [stdout] | [INFO] [stdout] 129 | ::fmt(&self, f) [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:164:35 [INFO] [stdout] | [INFO] [stdout] 164 | ::fmt(&self, f) [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:199:35 [INFO] [stdout] | [INFO] [stdout] 199 | ::fmt(&self, f) [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:241:35 [INFO] [stdout] | [INFO] [stdout] 241 | ::fmt(&self, f) [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:324:35 [INFO] [stdout] | [INFO] [stdout] 324 | ::fmt(&self, f) [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:375:35 [INFO] [stdout] | [INFO] [stdout] 375 | ::fmt(&self, f) [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:428:35 [INFO] [stdout] | [INFO] [stdout] 428 | ::fmt(&self, f) [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/lib.rs:475:13 [INFO] [stdout] | [INFO] [stdout] 475 | if !(val >= 0.0 && val <= 1.0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&val)` [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: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/lib.rs:531:13 [INFO] [stdout] | [INFO] [stdout] 531 | if !(val >= -1999 && val <= 9999) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-1999..=9999).contains(&val)` [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/lib.rs:546:13 [INFO] [stdout] | [INFO] [stdout] 546 | if !(val >= -1999 && val <= 9999) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-1999..=9999).contains(&val)` [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/lib.rs:561:13 [INFO] [stdout] | [INFO] [stdout] 561 | if !(val >= -1999 && val <= 9999) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-1999..=9999).contains(&val)` [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/lib.rs:575:13 [INFO] [stdout] | [INFO] [stdout] 575 | if !(val >= -0.1 && val <= 9999.9) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-0.1..=9999.9).contains(&val)` [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/lib.rs:589:13 [INFO] [stdout] | [INFO] [stdout] 589 | if !(val >= 2 && val <= 1999) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(2..=1999).contains(&val)` [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 boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:604:12 [INFO] [stdout] | [INFO] [stdout] 604 | if !(val <= 999) { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `(val > 999)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/lib.rs:619:13 [INFO] [stdout] | [INFO] [stdout] 619 | if !(val >= 1 && val <= 1999) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1..=1999).contains(&val)` [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/lib.rs:643:13 [INFO] [stdout] | [INFO] [stdout] 643 | if !(val >= 0.0 && val <= 1.0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&val)` [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 (`f32` -> `f32`) [INFO] [stdout] --> src/lib.rs:644:47 [INFO] [stdout] | [INFO] [stdout] 644 | return Err(Error::UnexpectedValue(val as f32)); [INFO] [stdout] | ^^^^^^^^^^ help: try: `val` [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 `RangeInclusive::contains` implementation [INFO] [stdout] --> src/lib.rs:663:13 [INFO] [stdout] | [INFO] [stdout] 663 | if !(val >= 1 && val <= 500) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1..=500).contains(&val)` [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 boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:734:12 [INFO] [stdout] | [INFO] [stdout] 734 | if !(val <= 9999) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `(val > 9999)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/lib.rs:749:13 [INFO] [stdout] | [INFO] [stdout] 749 | if !(val >= -1000 && val <= 1000) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-1000..=1000).contains(&val)` [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 boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:790:12 [INFO] [stdout] | [INFO] [stdout] 790 | if !(val <= 64) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `(val > 64)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `buf` [INFO] [stdout] --> src/lib.rs:923:18 [INFO] [stdout] | [INFO] [stdout] 923 | for i in 0..buf.len() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 923 - for i in 0..buf.len() { [INFO] [stdout] 923 + for in &mut buf { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/lib.rs:924:58 [INFO] [stdout] | [INFO] [stdout] 924 | let b = nb::block!(self.port.read()).map_err(|err| Error::SerialError(err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::SerialError` [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: redundant closure [INFO] [stdout] --> src/lib.rs:932:52 [INFO] [stdout] | [INFO] [stdout] 932 | nb::block!(self.port.write(b)).map_err(|err| Error::SerialError(err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::SerialError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> examples/dump.rs:21:50 [INFO] [stdout] | [INFO] [stdout] 21 | let port = embedded_serial::EmbeddedSerial { port: port }; [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `port` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.94s [INFO] running `Command { std: "docker" "inspect" "9ed1915cbbd2629907ade40f9664ff304c70234ce65014d5021b3d9bc28eb03e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9ed1915cbbd2629907ade40f9664ff304c70234ce65014d5021b3d9bc28eb03e", kill_on_drop: false }` [INFO] [stdout] 9ed1915cbbd2629907ade40f9664ff304c70234ce65014d5021b3d9bc28eb03e