[INFO] fetching crate sths34pf80 0.1.12... [INFO] checking sths34pf80-0.1.12 against try#a4980311fb7bb9e7893708e6bd3fbbfb2819fd3d for pr-145342-1 [INFO] extracting crate sths34pf80 0.1.12 into /workspace/builds/worker-2-tc2/source [INFO] started tweaking crates.io crate sths34pf80 0.1.12 [INFO] finished tweaking crates.io crate sths34pf80 0.1.12 [INFO] tweaked toml for crates.io crate sths34pf80 0.1.12 written to /workspace/builds/worker-2-tc2/source/Cargo.toml [INFO] validating manifest of crates.io crate sths34pf80 0.1.12 on toolchain a4980311fb7bb9e7893708e6bd3fbbfb2819fd3d [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+a4980311fb7bb9e7893708e6bd3fbbfb2819fd3d" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate sths34pf80 0.1.12 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" "+a4980311fb7bb9e7893708e6bd3fbbfb2819fd3d" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+a4980311fb7bb9e7893708e6bd3fbbfb2819fd3d" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] c29b9991885c90eef4733a155476e4af8e4a7f710daaa09db4430ad275045ed5 [INFO] running `Command { std: "docker" "start" "-a" "c29b9991885c90eef4733a155476e4af8e4a7f710daaa09db4430ad275045ed5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "c29b9991885c90eef4733a155476e4af8e4a7f710daaa09db4430ad275045ed5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c29b9991885c90eef4733a155476e4af8e4a7f710daaa09db4430ad275045ed5", kill_on_drop: false }` [INFO] [stdout] c29b9991885c90eef4733a155476e4af8e4a7f710daaa09db4430ad275045ed5 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+a4980311fb7bb9e7893708e6bd3fbbfb2819fd3d" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 14d46eee561ab81af63acafe1c86dddda021c1d5293372c40f051a9c8e922b23 [INFO] running `Command { std: "docker" "start" "-a" "14d46eee561ab81af63acafe1c86dddda021c1d5293372c40f051a9c8e922b23", kill_on_drop: false }` [INFO] [stderr] Compiling version_check v0.9.5 [INFO] [stderr] Compiling proc-macro2 v1.0.71 [INFO] [stderr] Compiling unicode-ident v1.0.12 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling autocfg v1.1.0 [INFO] [stderr] Compiling pulldown-cmark v0.11.2 [INFO] [stderr] Compiling memchr v2.7.4 [INFO] [stderr] Compiling bitflags v2.6.0 [INFO] [stderr] Checking log v0.4.22 [INFO] [stderr] Checking bitfield v0.14.0 [INFO] [stderr] Checking embedded-hal v1.0.0 [INFO] [stderr] Checking byteorder v1.5.0 [INFO] [stderr] Compiling unicase v2.7.0 [INFO] [stderr] Compiling proc-macro-error-attr v1.0.4 [INFO] [stderr] Compiling proc-macro-error v1.0.4 [INFO] [stderr] Compiling num-traits v0.2.17 [INFO] [stderr] Compiling quote v1.0.33 [INFO] [stderr] Compiling maybe-async-cfg v0.2.4 [INFO] [stderr] Checking sths34pf80 v0.1.12 (/opt/rustwide/workdir) [INFO] [stdout] warning: variant `AVG_T8` should have an upper camel case name [INFO] [stdout] --> src/data.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | AVG_T8 = 0x00, [INFO] [stdout] | ^^^^^^ help: convert the identifier to upper camel case: `AvgT8` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `AVG_T4` should have an upper camel case name [INFO] [stdout] --> src/data.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | AVG_T4 = 0x01, [INFO] [stdout] | ^^^^^^ help: convert the identifier to upper camel case: `AvgT4` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `AVG_T2` should have an upper camel case name [INFO] [stdout] --> src/data.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | AVG_T2 = 0x02, [INFO] [stdout] | ^^^^^^ help: convert the identifier to upper camel case: `AvgT2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `AVG_T1` should have an upper camel case name [INFO] [stdout] --> src/data.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | AVG_T1 = 0x03, [INFO] [stdout] | ^^^^^^ help: convert the identifier to upper camel case: `AvgT1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `AVG_TMOS2` should have an upper camel case name [INFO] [stdout] --> src/data.rs:54:5 [INFO] [stdout] | [INFO] [stdout] 54 | AVG_TMOS2 = 0x00, [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to upper camel case: `AvgTmos2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `AVG_TMOS8` should have an upper camel case name [INFO] [stdout] --> src/data.rs:55:5 [INFO] [stdout] | [INFO] [stdout] 55 | AVG_TMOS8 = 0x01, [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to upper camel case: `AvgTmos8` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `AVG_TMOS32` should have an upper camel case name [INFO] [stdout] --> src/data.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | AVG_TMOS32 = 0x02, [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `AvgTmos32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `AVG_TMOS128` should have an upper camel case name [INFO] [stdout] --> src/data.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 57 | AVG_TMOS128 = 0x03, // default [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `AvgTmos128` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `AVG_TMOS256` should have an upper camel case name [INFO] [stdout] --> src/data.rs:58:5 [INFO] [stdout] | [INFO] [stdout] 58 | AVG_TMOS256 = 0x04, [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `AvgTmos256` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `AVG_TMOS512` should have an upper camel case name [INFO] [stdout] --> src/data.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | AVG_TMOS512 = 0x05, [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `AvgTmos512` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `AVG_TMOS1024` should have an upper camel case name [INFO] [stdout] --> src/data.rs:60:5 [INFO] [stdout] | [INFO] [stdout] 60 | AVG_TMOS1024 = 0x06, [INFO] [stdout] | ^^^^^^^^^^^^ help: convert the identifier to upper camel case: `AvgTmos1024` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `AVG_TMOS2048` should have an upper camel case name [INFO] [stdout] --> src/data.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | AVG_TMOS2048 = 0x07, [INFO] [stdout] | ^^^^^^^^^^^^ help: convert the identifier to upper camel case: `AvgTmos2048` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `Avg_trim` should have an upper camel case name [INFO] [stdout] --> src/data.rs:83:16 [INFO] [stdout] | [INFO] [stdout] 83 | pub struct Avg_trim(u8); [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to upper camel case: `AvgTrim` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `ODR_POWERDOWN` should have an upper camel case name [INFO] [stdout] --> src/data.rs:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | ODR_POWERDOWN = 0x00, [INFO] [stdout] | ^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `OdrPowerdown` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `ODR_HZ025` should have an upper camel case name [INFO] [stdout] --> src/data.rs:99:5 [INFO] [stdout] | [INFO] [stdout] 99 | ODR_HZ025 = 0x01, [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to upper camel case: `OdrHz025` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `ODR_HZ050` should have an upper camel case name [INFO] [stdout] --> src/data.rs:100:5 [INFO] [stdout] | [INFO] [stdout] 100 | ODR_HZ050 = 0x02, [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to upper camel case: `OdrHz050` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `ODR_HZ1` should have an upper camel case name [INFO] [stdout] --> src/data.rs:101:5 [INFO] [stdout] | [INFO] [stdout] 101 | ODR_HZ1 = 0x03, [INFO] [stdout] | ^^^^^^^ help: convert the identifier to upper camel case: `OdrHz1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `ODR_HZ2` should have an upper camel case name [INFO] [stdout] --> src/data.rs:102:5 [INFO] [stdout] | [INFO] [stdout] 102 | ODR_HZ2 = 0x04, [INFO] [stdout] | ^^^^^^^ help: convert the identifier to upper camel case: `OdrHz2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `ODR_HZ4` should have an upper camel case name [INFO] [stdout] --> src/data.rs:103:5 [INFO] [stdout] | [INFO] [stdout] 103 | ODR_HZ4 = 0x05, [INFO] [stdout] | ^^^^^^^ help: convert the identifier to upper camel case: `OdrHz4` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `ODR_HZ8` should have an upper camel case name [INFO] [stdout] --> src/data.rs:104:5 [INFO] [stdout] | [INFO] [stdout] 104 | ODR_HZ8 = 0x06, [INFO] [stdout] | ^^^^^^^ help: convert the identifier to upper camel case: `OdrHz8` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `ODR_HZ15` should have an upper camel case name [INFO] [stdout] --> src/data.rs:105:5 [INFO] [stdout] | [INFO] [stdout] 105 | ODR_HZ15 = 0x07, [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to upper camel case: `OdrHz15` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `ODR_HZ30` should have an upper camel case name [INFO] [stdout] --> src/data.rs:106:5 [INFO] [stdout] | [INFO] [stdout] 106 | ODR_HZ30 = 0x08, [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to upper camel case: `OdrHz30` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `LPF_DIV` should have an upper camel case name [INFO] [stdout] --> src/data.rs:187:10 [INFO] [stdout] | [INFO] [stdout] 187 | pub enum LPF_DIV { [INFO] [stdout] | ^^^^^^^ help: convert the identifier to upper camel case: `LpfDiv` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `STHS34PF80_LPF_ODR_DIV_9` should have an upper camel case name [INFO] [stdout] --> src/data.rs:188:5 [INFO] [stdout] | [INFO] [stdout] 188 | STHS34PF80_LPF_ODR_DIV_9 = 0x00, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `Sths34pf80LpfOdrDiv9` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `STHS34PF80_LPF_ODR_DIV_20` should have an upper camel case name [INFO] [stdout] --> src/data.rs:189:5 [INFO] [stdout] | [INFO] [stdout] 189 | STHS34PF80_LPF_ODR_DIV_20 = 0x01, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `Sths34pf80LpfOdrDiv20` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `STHS34PF80_LPF_ODR_DIV_50` should have an upper camel case name [INFO] [stdout] --> src/data.rs:190:5 [INFO] [stdout] | [INFO] [stdout] 190 | STHS34PF80_LPF_ODR_DIV_50 = 0x02, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `Sths34pf80LpfOdrDiv50` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `STHS34PF80_LPF_ODR_DIV_100` should have an upper camel case name [INFO] [stdout] --> src/data.rs:191:5 [INFO] [stdout] | [INFO] [stdout] 191 | STHS34PF80_LPF_ODR_DIV_100 = 0x03, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `Sths34pf80LpfOdrDiv100` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `STHS34PF80_LPF_ODR_DIV_200` should have an upper camel case name [INFO] [stdout] --> src/data.rs:192:5 [INFO] [stdout] | [INFO] [stdout] 192 | STHS34PF80_LPF_ODR_DIV_200 = 0x04, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `Sths34pf80LpfOdrDiv200` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `STHS34PF80_LPF_ODR_DIV_400` should have an upper camel case name [INFO] [stdout] --> src/data.rs:193:5 [INFO] [stdout] | [INFO] [stdout] 193 | STHS34PF80_LPF_ODR_DIV_400 = 0x05, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `Sths34pf80LpfOdrDiv400` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `STHS34PF80_LPF_ODR_DIV_800` should have an upper camel case name [INFO] [stdout] --> src/data.rs:194:5 [INFO] [stdout] | [INFO] [stdout] 194 | STHS34PF80_LPF_ODR_DIV_800 = 0x06, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `Sths34pf80LpfOdrDiv800` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `DeviceAddress` and `STHS34PF80_TPRESENCE_H` [INFO] [stdout] --> src/lib.rs:14:17 [INFO] [stdout] | [INFO] [stdout] 14 | ...::{DeviceAddress, STHS34PF80_CTRL0, STHS34PF80_HYST_MOTION, STHS34PF80_HYST_PRESENCE, STHS34PF80_HYST_TAMB_SHOCK, STHS34PF80_LPF2, STHS34PF80_MOTION_THS, STHS34PF80_PRESENCE_THS, STHS34PF80_TAMB_SHOCK_L, STHS34PF80_TAMB_SHOCK_THS, STHS34PF80_TMOTION_L, STHS34PF80_TOBJECT_L, STHS34PF80_TPRESENCE_H, S... [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `info` [INFO] [stdout] --> src/lib.rs:34:18 [INFO] [stdout] | [INFO] [stdout] 34 | use log::{debug, info}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:133:12 [INFO] [stdout] | [INFO] [stdout] 133 | if (result_buf[0] == STHS34PF80_PART_ID) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 133 - if (result_buf[0] == STHS34PF80_PART_ID) { [INFO] [stdout] 133 + if result_buf[0] == STHS34PF80_PART_ID { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:144:12 [INFO] [stdout] | [INFO] [stdout] 144 | if ((result_buf[0] & 0x04) != 0x00) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 144 - if ((result_buf[0] & 0x04) != 0x00) { [INFO] [stdout] 144 + if (result_buf[0] & 0x04) != 0x00 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:321:12 [INFO] [stdout] | [INFO] [stdout] 321 | if (len == 1) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 321 - if (len == 1) { [INFO] [stdout] 321 + if len == 1 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:323:19 [INFO] [stdout] | [INFO] [stdout] 323 | } else if (len == 2) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 323 - } else if (len == 2) { [INFO] [stdout] 323 + } else if len == 2 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:350:12 [INFO] [stdout] | [INFO] [stdout] 350 | if (new_odr != Odr::ODR_POWERDOWN) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 350 - if (new_odr != Odr::ODR_POWERDOWN) { [INFO] [stdout] 350 + if new_odr != Odr::ODR_POWERDOWN { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around function argument [INFO] [stdout] --> src/lib.rs:400:12 [INFO] [stdout] | [INFO] [stdout] 400 | Ok((false)) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 400 - Ok((false)) [INFO] [stdout] 400 + Ok(false) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:405:12 [INFO] [stdout] | [INFO] [stdout] 405 | if (!self.is_connected().await?) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 405 - if (!self.is_connected().await?) { [INFO] [stdout] 405 + if !self.is_connected().await? { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:507:12 [INFO] [stdout] | [INFO] [stdout] 507 | if (odr_new > odr_max) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 507 - if (odr_new > odr_max) { [INFO] [stdout] 507 + if odr_new > odr_max { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:720:12 [INFO] [stdout] | [INFO] [stdout] 720 | if ( (write_value < -128.0) || (write_value > 127.0) ) { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 720 - if ( (write_value < -128.0) || (write_value > 127.0) ) { [INFO] [stdout] 720 + if (write_value < -128.0) || (write_value > 127.0) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:760:12 [INFO] [stdout] | [INFO] [stdout] 760 | if ((result_buf[0] & 0x01) != 0x00) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 760 - if ((result_buf[0] & 0x01) != 0x00) { [INFO] [stdout] 760 + if (result_buf[0] & 0x01) != 0x00 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:772:12 [INFO] [stdout] | [INFO] [stdout] 772 | if (trigger) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 772 - if (trigger) { [INFO] [stdout] 772 + if trigger { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `while` condition [INFO] [stdout] --> src/lib.rs:901:15 [INFO] [stdout] | [INFO] [stdout] 901 | while (forever) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 901 - while (forever) { [INFO] [stdout] 901 + while forever { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:903:20 [INFO] [stdout] | [INFO] [stdout] 903 | if (data_ready) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 903 - if (data_ready) { [INFO] [stdout] 903 + if data_ready { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:907:28 [INFO] [stdout] | [INFO] [stdout] 907 | if (func_status.presence_flag()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 907 - if (func_status.presence_flag()) { [INFO] [stdout] 907 + if func_status.presence_flag() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:912:28 [INFO] [stdout] | [INFO] [stdout] 912 | if (func_status.mot_flag()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 912 - if (func_status.mot_flag()) { [INFO] [stdout] 912 + if func_status.mot_flag() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:917:28 [INFO] [stdout] | [INFO] [stdout] 917 | if (func_status.tamb_shock_flag()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 917 - if (func_status.tamb_shock_flag()) { [INFO] [stdout] 917 + if func_status.tamb_shock_flag() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:922:28 [INFO] [stdout] | [INFO] [stdout] 922 | if (func_status.presence_flag() || func_status.mot_flag() || func_status.tamb_shock_flag()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 922 - if (func_status.presence_flag() || func_status.mot_flag() || func_status.tamb_shock_flag()) { [INFO] [stdout] 922 + if func_status.presence_flag() || func_status.mot_flag() || func_status.tamb_shock_flag() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `while` condition [INFO] [stdout] --> src/lib.rs:951:15 [INFO] [stdout] | [INFO] [stdout] 951 | while (!timeout) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 951 - while (!timeout) { [INFO] [stdout] 951 + while !timeout { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:953:20 [INFO] [stdout] | [INFO] [stdout] 953 | if (data_ready) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 953 - if (data_ready) { [INFO] [stdout] 953 + if data_ready { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:957:28 [INFO] [stdout] | [INFO] [stdout] 957 | if (func_status.presence_flag()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 957 - if (func_status.presence_flag()) { [INFO] [stdout] 957 + if func_status.presence_flag() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:962:28 [INFO] [stdout] | [INFO] [stdout] 962 | if (func_status.mot_flag()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 962 - if (func_status.mot_flag()) { [INFO] [stdout] 962 + if func_status.mot_flag() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:967:28 [INFO] [stdout] | [INFO] [stdout] 967 | if (func_status.tamb_shock_flag()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 967 - if (func_status.tamb_shock_flag()) { [INFO] [stdout] 967 + if func_status.tamb_shock_flag() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:972:28 [INFO] [stdout] | [INFO] [stdout] 972 | if (func_status.presence_flag() || func_status.mot_flag() || func_status.tamb_shock_flag()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 972 - if (func_status.presence_flag() || func_status.mot_flag() || func_status.tamb_shock_flag()) { [INFO] [stdout] 972 + if func_status.presence_flag() || func_status.mot_flag() || func_status.tamb_shock_flag() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:979:21 [INFO] [stdout] | [INFO] [stdout] 979 | if (loop_count >= timeouts_50ms) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 979 - if (loop_count >= timeouts_50ms) { [INFO] [stdout] 979 + if loop_count >= timeouts_50ms { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:990:24 [INFO] [stdout] | [INFO] [stdout] 990 | if (loop_count >= timeouts_50ms) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 990 - if (loop_count >= timeouts_50ms) { [INFO] [stdout] 990 + if loop_count >= timeouts_50ms { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `AVG_T8` should have an upper camel case name [INFO] [stdout] --> src/data.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | AVG_T8 = 0x00, [INFO] [stdout] | ^^^^^^ help: convert the identifier to upper camel case: `AvgT8` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `AVG_T4` should have an upper camel case name [INFO] [stdout] --> src/data.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | AVG_T4 = 0x01, [INFO] [stdout] | ^^^^^^ help: convert the identifier to upper camel case: `AvgT4` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `AVG_T2` should have an upper camel case name [INFO] [stdout] --> src/data.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | AVG_T2 = 0x02, [INFO] [stdout] | ^^^^^^ help: convert the identifier to upper camel case: `AvgT2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `AVG_T1` should have an upper camel case name [INFO] [stdout] --> src/data.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | AVG_T1 = 0x03, [INFO] [stdout] | ^^^^^^ help: convert the identifier to upper camel case: `AvgT1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `AVG_TMOS2` should have an upper camel case name [INFO] [stdout] --> src/data.rs:54:5 [INFO] [stdout] | [INFO] [stdout] 54 | AVG_TMOS2 = 0x00, [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to upper camel case: `AvgTmos2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `AVG_TMOS8` should have an upper camel case name [INFO] [stdout] --> src/data.rs:55:5 [INFO] [stdout] | [INFO] [stdout] 55 | AVG_TMOS8 = 0x01, [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to upper camel case: `AvgTmos8` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `AVG_TMOS32` should have an upper camel case name [INFO] [stdout] --> src/data.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | AVG_TMOS32 = 0x02, [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `AvgTmos32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `AVG_TMOS128` should have an upper camel case name [INFO] [stdout] --> src/data.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 57 | AVG_TMOS128 = 0x03, // default [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `AvgTmos128` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `AVG_TMOS256` should have an upper camel case name [INFO] [stdout] --> src/data.rs:58:5 [INFO] [stdout] | [INFO] [stdout] 58 | AVG_TMOS256 = 0x04, [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `AvgTmos256` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `AVG_TMOS512` should have an upper camel case name [INFO] [stdout] --> src/data.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | AVG_TMOS512 = 0x05, [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `AvgTmos512` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `AVG_TMOS1024` should have an upper camel case name [INFO] [stdout] --> src/data.rs:60:5 [INFO] [stdout] | [INFO] [stdout] 60 | AVG_TMOS1024 = 0x06, [INFO] [stdout] | ^^^^^^^^^^^^ help: convert the identifier to upper camel case: `AvgTmos1024` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `AVG_TMOS2048` should have an upper camel case name [INFO] [stdout] --> src/data.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | AVG_TMOS2048 = 0x07, [INFO] [stdout] | ^^^^^^^^^^^^ help: convert the identifier to upper camel case: `AvgTmos2048` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `Avg_trim` should have an upper camel case name [INFO] [stdout] --> src/data.rs:83:16 [INFO] [stdout] | [INFO] [stdout] 83 | pub struct Avg_trim(u8); [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to upper camel case: `AvgTrim` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `ODR_POWERDOWN` should have an upper camel case name [INFO] [stdout] --> src/data.rs:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | ODR_POWERDOWN = 0x00, [INFO] [stdout] | ^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `OdrPowerdown` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `ODR_HZ025` should have an upper camel case name [INFO] [stdout] --> src/data.rs:99:5 [INFO] [stdout] | [INFO] [stdout] 99 | ODR_HZ025 = 0x01, [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to upper camel case: `OdrHz025` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `ODR_HZ050` should have an upper camel case name [INFO] [stdout] --> src/data.rs:100:5 [INFO] [stdout] | [INFO] [stdout] 100 | ODR_HZ050 = 0x02, [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to upper camel case: `OdrHz050` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `ODR_HZ1` should have an upper camel case name [INFO] [stdout] --> src/data.rs:101:5 [INFO] [stdout] | [INFO] [stdout] 101 | ODR_HZ1 = 0x03, [INFO] [stdout] | ^^^^^^^ help: convert the identifier to upper camel case: `OdrHz1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `ODR_HZ2` should have an upper camel case name [INFO] [stdout] --> src/data.rs:102:5 [INFO] [stdout] | [INFO] [stdout] 102 | ODR_HZ2 = 0x04, [INFO] [stdout] | ^^^^^^^ help: convert the identifier to upper camel case: `OdrHz2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `ODR_HZ4` should have an upper camel case name [INFO] [stdout] --> src/data.rs:103:5 [INFO] [stdout] | [INFO] [stdout] 103 | ODR_HZ4 = 0x05, [INFO] [stdout] | ^^^^^^^ help: convert the identifier to upper camel case: `OdrHz4` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `ODR_HZ8` should have an upper camel case name [INFO] [stdout] --> src/data.rs:104:5 [INFO] [stdout] | [INFO] [stdout] 104 | ODR_HZ8 = 0x06, [INFO] [stdout] | ^^^^^^^ help: convert the identifier to upper camel case: `OdrHz8` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `ODR_HZ15` should have an upper camel case name [INFO] [stdout] --> src/data.rs:105:5 [INFO] [stdout] | [INFO] [stdout] 105 | ODR_HZ15 = 0x07, [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to upper camel case: `OdrHz15` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `ODR_HZ30` should have an upper camel case name [INFO] [stdout] --> src/data.rs:106:5 [INFO] [stdout] | [INFO] [stdout] 106 | ODR_HZ30 = 0x08, [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to upper camel case: `OdrHz30` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `LPF_DIV` should have an upper camel case name [INFO] [stdout] --> src/data.rs:187:10 [INFO] [stdout] | [INFO] [stdout] 187 | pub enum LPF_DIV { [INFO] [stdout] | ^^^^^^^ help: convert the identifier to upper camel case: `LpfDiv` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `STHS34PF80_LPF_ODR_DIV_9` should have an upper camel case name [INFO] [stdout] --> src/data.rs:188:5 [INFO] [stdout] | [INFO] [stdout] 188 | STHS34PF80_LPF_ODR_DIV_9 = 0x00, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `Sths34pf80LpfOdrDiv9` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `STHS34PF80_LPF_ODR_DIV_20` should have an upper camel case name [INFO] [stdout] --> src/data.rs:189:5 [INFO] [stdout] | [INFO] [stdout] 189 | STHS34PF80_LPF_ODR_DIV_20 = 0x01, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `Sths34pf80LpfOdrDiv20` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `STHS34PF80_LPF_ODR_DIV_50` should have an upper camel case name [INFO] [stdout] --> src/data.rs:190:5 [INFO] [stdout] | [INFO] [stdout] 190 | STHS34PF80_LPF_ODR_DIV_50 = 0x02, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `Sths34pf80LpfOdrDiv50` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `STHS34PF80_LPF_ODR_DIV_100` should have an upper camel case name [INFO] [stdout] --> src/data.rs:191:5 [INFO] [stdout] | [INFO] [stdout] 191 | STHS34PF80_LPF_ODR_DIV_100 = 0x03, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `Sths34pf80LpfOdrDiv100` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `STHS34PF80_LPF_ODR_DIV_200` should have an upper camel case name [INFO] [stdout] --> src/data.rs:192:5 [INFO] [stdout] | [INFO] [stdout] 192 | STHS34PF80_LPF_ODR_DIV_200 = 0x04, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `Sths34pf80LpfOdrDiv200` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `STHS34PF80_LPF_ODR_DIV_400` should have an upper camel case name [INFO] [stdout] --> src/data.rs:193:5 [INFO] [stdout] | [INFO] [stdout] 193 | STHS34PF80_LPF_ODR_DIV_400 = 0x05, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `Sths34pf80LpfOdrDiv400` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `STHS34PF80_LPF_ODR_DIV_800` should have an upper camel case name [INFO] [stdout] --> src/data.rs:194:5 [INFO] [stdout] | [INFO] [stdout] 194 | STHS34PF80_LPF_ODR_DIV_800 = 0x06, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `Sths34pf80LpfOdrDiv800` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `DeviceAddress` and `STHS34PF80_TPRESENCE_H` [INFO] [stdout] --> src/lib.rs:14:17 [INFO] [stdout] | [INFO] [stdout] 14 | ...::{DeviceAddress, STHS34PF80_CTRL0, STHS34PF80_HYST_MOTION, STHS34PF80_HYST_PRESENCE, STHS34PF80_HYST_TAMB_SHOCK, STHS34PF80_LPF2, STHS34PF80_MOTION_THS, STHS34PF80_PRESENCE_THS, STHS34PF80_TAMB_SHOCK_L, STHS34PF80_TAMB_SHOCK_THS, STHS34PF80_TMOTION_L, STHS34PF80_TOBJECT_L, STHS34PF80_TPRESENCE_H, S... [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `info` [INFO] [stdout] --> src/lib.rs:34:18 [INFO] [stdout] | [INFO] [stdout] 34 | use log::{debug, info}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:133:12 [INFO] [stdout] | [INFO] [stdout] 133 | if (result_buf[0] == STHS34PF80_PART_ID) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 133 - if (result_buf[0] == STHS34PF80_PART_ID) { [INFO] [stdout] 133 + if result_buf[0] == STHS34PF80_PART_ID { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:144:12 [INFO] [stdout] | [INFO] [stdout] 144 | if ((result_buf[0] & 0x04) != 0x00) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 144 - if ((result_buf[0] & 0x04) != 0x00) { [INFO] [stdout] 144 + if (result_buf[0] & 0x04) != 0x00 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:321:12 [INFO] [stdout] | [INFO] [stdout] 321 | if (len == 1) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 321 - if (len == 1) { [INFO] [stdout] 321 + if len == 1 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:323:19 [INFO] [stdout] | [INFO] [stdout] 323 | } else if (len == 2) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 323 - } else if (len == 2) { [INFO] [stdout] 323 + } else if len == 2 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:350:12 [INFO] [stdout] | [INFO] [stdout] 350 | if (new_odr != Odr::ODR_POWERDOWN) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 350 - if (new_odr != Odr::ODR_POWERDOWN) { [INFO] [stdout] 350 + if new_odr != Odr::ODR_POWERDOWN { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around function argument [INFO] [stdout] --> src/lib.rs:400:12 [INFO] [stdout] | [INFO] [stdout] 400 | Ok((false)) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 400 - Ok((false)) [INFO] [stdout] 400 + Ok(false) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:405:12 [INFO] [stdout] | [INFO] [stdout] 405 | if (!self.is_connected().await?) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 405 - if (!self.is_connected().await?) { [INFO] [stdout] 405 + if !self.is_connected().await? { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:507:12 [INFO] [stdout] | [INFO] [stdout] 507 | if (odr_new > odr_max) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 507 - if (odr_new > odr_max) { [INFO] [stdout] 507 + if odr_new > odr_max { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:720:12 [INFO] [stdout] | [INFO] [stdout] 720 | if ( (write_value < -128.0) || (write_value > 127.0) ) { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 720 - if ( (write_value < -128.0) || (write_value > 127.0) ) { [INFO] [stdout] 720 + if (write_value < -128.0) || (write_value > 127.0) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:760:12 [INFO] [stdout] | [INFO] [stdout] 760 | if ((result_buf[0] & 0x01) != 0x00) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 760 - if ((result_buf[0] & 0x01) != 0x00) { [INFO] [stdout] 760 + if (result_buf[0] & 0x01) != 0x00 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:772:12 [INFO] [stdout] | [INFO] [stdout] 772 | if (trigger) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 772 - if (trigger) { [INFO] [stdout] 772 + if trigger { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `while` condition [INFO] [stdout] --> src/lib.rs:901:15 [INFO] [stdout] | [INFO] [stdout] 901 | while (forever) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 901 - while (forever) { [INFO] [stdout] 901 + while forever { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:903:20 [INFO] [stdout] | [INFO] [stdout] 903 | if (data_ready) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 903 - if (data_ready) { [INFO] [stdout] 903 + if data_ready { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:907:28 [INFO] [stdout] | [INFO] [stdout] 907 | if (func_status.presence_flag()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 907 - if (func_status.presence_flag()) { [INFO] [stdout] 907 + if func_status.presence_flag() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:912:28 [INFO] [stdout] | [INFO] [stdout] 912 | if (func_status.mot_flag()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 912 - if (func_status.mot_flag()) { [INFO] [stdout] 912 + if func_status.mot_flag() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:917:28 [INFO] [stdout] | [INFO] [stdout] 917 | if (func_status.tamb_shock_flag()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 917 - if (func_status.tamb_shock_flag()) { [INFO] [stdout] 917 + if func_status.tamb_shock_flag() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:922:28 [INFO] [stdout] | [INFO] [stdout] 922 | if (func_status.presence_flag() || func_status.mot_flag() || func_status.tamb_shock_flag()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 922 - if (func_status.presence_flag() || func_status.mot_flag() || func_status.tamb_shock_flag()) { [INFO] [stdout] 922 + if func_status.presence_flag() || func_status.mot_flag() || func_status.tamb_shock_flag() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `while` condition [INFO] [stdout] --> src/lib.rs:951:15 [INFO] [stdout] | [INFO] [stdout] 951 | while (!timeout) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 951 - while (!timeout) { [INFO] [stdout] 951 + while !timeout { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:953:20 [INFO] [stdout] | [INFO] [stdout] 953 | if (data_ready) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 953 - if (data_ready) { [INFO] [stdout] 953 + if data_ready { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:957:28 [INFO] [stdout] | [INFO] [stdout] 957 | if (func_status.presence_flag()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 957 - if (func_status.presence_flag()) { [INFO] [stdout] 957 + if func_status.presence_flag() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:962:28 [INFO] [stdout] | [INFO] [stdout] 962 | if (func_status.mot_flag()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 962 - if (func_status.mot_flag()) { [INFO] [stdout] 962 + if func_status.mot_flag() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:967:28 [INFO] [stdout] | [INFO] [stdout] 967 | if (func_status.tamb_shock_flag()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 967 - if (func_status.tamb_shock_flag()) { [INFO] [stdout] 967 + if func_status.tamb_shock_flag() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:972:28 [INFO] [stdout] | [INFO] [stdout] 972 | if (func_status.presence_flag() || func_status.mot_flag() || func_status.tamb_shock_flag()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 972 - if (func_status.presence_flag() || func_status.mot_flag() || func_status.tamb_shock_flag()) { [INFO] [stdout] 972 + if func_status.presence_flag() || func_status.mot_flag() || func_status.tamb_shock_flag() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:979:21 [INFO] [stdout] | [INFO] [stdout] 979 | if (loop_count >= timeouts_50ms) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 979 - if (loop_count >= timeouts_50ms) { [INFO] [stdout] 979 + if loop_count >= timeouts_50ms { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lib.rs:990:24 [INFO] [stdout] | [INFO] [stdout] 990 | if (loop_count >= timeouts_50ms) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 990 - if (loop_count >= timeouts_50ms) { [INFO] [stdout] 990 + if loop_count >= timeouts_50ms { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `index` is never read [INFO] [stdout] --> src/lib.rs:246:17 [INFO] [stdout] | [INFO] [stdout] 246 | let mut index: usize = 0; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `odr_max` is never read [INFO] [stdout] --> src/lib.rs:496:17 [INFO] [stdout] | [INFO] [stdout] 496 | let mut odr_max: Odr = Odr::ODR_HZ1; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `new_value` is never read [INFO] [stdout] --> src/lib.rs:771:17 [INFO] [stdout] | [INFO] [stdout] 771 | let mut new_value: u8 = 0x00; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `index` is never read [INFO] [stdout] --> src/lib.rs:246:17 [INFO] [stdout] | [INFO] [stdout] 246 | let mut index: usize = 0; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `odr_max` is never read [INFO] [stdout] --> src/lib.rs:496:17 [INFO] [stdout] | [INFO] [stdout] 496 | let mut odr_max: Odr = Odr::ODR_HZ1; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `new_value` is never read [INFO] [stdout] --> src/lib.rs:771:17 [INFO] [stdout] | [INFO] [stdout] 771 | let mut new_value: u8 = 0x00; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of unresolved module or unlinked crate `esp_idf_hal` [INFO] [stdout] --> examples/presence_motion_shock.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | use esp_idf_hal::{ [INFO] [stdout] | ^^^^^^^^^^^ use of unresolved module or unlinked crate `esp_idf_hal` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `esp_idf_hal`, use `cargo add esp_idf_hal` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of unresolved module or unlinked crate `esp_idf_hal` [INFO] [stdout] --> examples/presence_motion_shock.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | use esp_idf_hal::{gpio::PinDriver, prelude::Peripherals}; [INFO] [stdout] | ^^^^^^^^^^^ use of unresolved module or unlinked crate `esp_idf_hal` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `esp_idf_hal`, use `cargo add esp_idf_hal` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0432]: unresolved import `anyhow` [INFO] [stdout] --> examples/presence_motion_shock.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | use anyhow::Result; [INFO] [stdout] | ^^^^^^ use of unresolved module or unlinked crate `anyhow` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `anyhow`, use `cargo add anyhow` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0432]: unresolved import `esp_idf_sys` [INFO] [stdout] --> examples/presence_motion_shock.rs:24:19 [INFO] [stdout] | [INFO] [stdout] 24 | use esp_idf_sys::{self as _}; [INFO] [stdout] | ^^^^^^^^^ no external crate `esp_idf_sys` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of unresolved module or unlinked crate `esp_idf_svc` [INFO] [stdout] --> examples/presence_motion_shock.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | esp_idf_svc::sys::link_patches(); [INFO] [stdout] | ^^^^^^^^^^^ use of unresolved module or unlinked crate `esp_idf_svc` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `esp_idf_svc`, use `cargo add esp_idf_svc` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of unresolved module or unlinked crate `esp_idf_svc` [INFO] [stdout] --> examples/presence_motion_shock.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | esp_idf_svc::log::EspLogger::initialize_default(); [INFO] [stdout] | ^^^^^^^^^^^ use of unresolved module or unlinked crate `esp_idf_svc` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `esp_idf_svc`, use `cargo add esp_idf_svc` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `AverageTrimT1Flag`, `AverageTrimTMOSFlag`, `Gain`, and `Measurements` [INFO] [stdout] --> examples/presence_motion_shock.rs:28:25 [INFO] [stdout] | [INFO] [stdout] 28 | use sths34pf80::{data::{AverageTrimT1Flag, AverageTrimTMOSFlag, Gain, InterruptPinConfig, Measurements}, Sths34pf80}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^ ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> examples/presence_motion_shock.rs:104:12 [INFO] [stdout] | [INFO] [stdout] 104 | if (new_int_config.get_u8_value() == int_pin_config) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 104 - if (new_int_config.get_u8_value() == int_pin_config) { [INFO] [stdout] 104 + if new_int_config.get_u8_value() == int_pin_config { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `kHz` found for type `{integer}` in the current scope [INFO] [stdout] --> examples/presence_motion_shock.rs:48:48 [INFO] [stdout] | [INFO] [stdout] 48 | let config = I2cConfig::new().baudrate(100.kHz().into()); [INFO] [stdout] | ^^^ method not found in `{integer}` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0432, E0433, E0599. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0432`. [INFO] [stdout] [INFO] [stderr] error: could not compile `sths34pf80` (example "presence_motion_shock") due to 7 previous errors; 2 warnings emitted [INFO] running `Command { std: "docker" "inspect" "14d46eee561ab81af63acafe1c86dddda021c1d5293372c40f051a9c8e922b23", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "14d46eee561ab81af63acafe1c86dddda021c1d5293372c40f051a9c8e922b23", kill_on_drop: false }` [INFO] [stdout] 14d46eee561ab81af63acafe1c86dddda021c1d5293372c40f051a9c8e922b23