[INFO] cloning repository https://github.com/vczr/ha-switch-mqtt [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/vczr/ha-switch-mqtt" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fvczr%2Fha-switch-mqtt", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fvczr%2Fha-switch-mqtt'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 9f5b3551c1d7b7f67f0f98ca3c02b249b6e625b1 [INFO] testing vczr/ha-switch-mqtt against master#414482f6a0d4e7290f614300581a0b55442552a3 for pr-140985 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fvczr%2Fha-switch-mqtt" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/vczr/ha-switch-mqtt on toolchain 414482f6a0d4e7290f614300581a0b55442552a3 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+414482f6a0d4e7290f614300581a0b55442552a3" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/vczr/ha-switch-mqtt [INFO] finished tweaking git repo https://github.com/vczr/ha-switch-mqtt [INFO] tweaked toml for git repo https://github.com/vczr/ha-switch-mqtt written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/vczr/ha-switch-mqtt 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" "+414482f6a0d4e7290f614300581a0b55442552a3" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [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:b0b074c097205a61b89e8ad263052f976b2b332c4dc5f02aef1fe52501660d6e" "/opt/rustwide/cargo-home/bin/cargo" "+414482f6a0d4e7290f614300581a0b55442552a3" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 011665a9b1f25e0730758117da2e73d7ee800193928c795df5f6f67fd6369356 [INFO] running `Command { std: "docker" "start" "-a" "011665a9b1f25e0730758117da2e73d7ee800193928c795df5f6f67fd6369356", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "011665a9b1f25e0730758117da2e73d7ee800193928c795df5f6f67fd6369356", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "011665a9b1f25e0730758117da2e73d7ee800193928c795df5f6f67fd6369356", kill_on_drop: false }` [INFO] [stdout] 011665a9b1f25e0730758117da2e73d7ee800193928c795df5f6f67fd6369356 [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:b0b074c097205a61b89e8ad263052f976b2b332c4dc5f02aef1fe52501660d6e" "/opt/rustwide/cargo-home/bin/cargo" "+414482f6a0d4e7290f614300581a0b55442552a3" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 7cbedcf148959f801f931df221b09b674ab78f80c94d356bfb687f2b468cd668 [INFO] running `Command { std: "docker" "start" "-a" "7cbedcf148959f801f931df221b09b674ab78f80c94d356bfb687f2b468cd668", kill_on_drop: false }` [INFO] [stderr] Compiling autocfg v1.3.0 [INFO] [stderr] Compiling proc-macro2 v1.0.86 [INFO] [stderr] Compiling unicode-ident v1.0.13 [INFO] [stderr] Compiling libc v0.2.158 [INFO] [stderr] Compiling shlex v1.3.0 [INFO] [stderr] Compiling scopeguard v1.2.0 [INFO] [stderr] Compiling rustls-pki-types v1.8.0 [INFO] [stderr] Compiling untrusted v0.9.0 [INFO] [stderr] Compiling pin-project-lite v0.2.14 [INFO] [stderr] Compiling rustls v0.22.4 [INFO] [stderr] Compiling log v0.4.22 [INFO] [stderr] Compiling futures-core v0.3.30 [INFO] [stderr] Compiling cc v1.1.18 [INFO] [stderr] Compiling thiserror v1.0.63 [INFO] [stderr] Compiling subtle v2.6.1 [INFO] [stderr] Compiling serde v1.0.210 [INFO] [stderr] Compiling base64 v0.22.1 [INFO] [stderr] Compiling zeroize v1.8.1 [INFO] [stderr] Compiling bytes v1.7.1 [INFO] [stderr] Compiling lock_api v0.4.12 [INFO] [stderr] Compiling slab v0.4.9 [INFO] [stderr] Compiling quote v1.0.37 [INFO] [stderr] Compiling syn v2.0.77 [INFO] [stderr] Compiling spin v0.9.8 [INFO] [stderr] Compiling openssl-probe v0.1.5 [INFO] [stderr] Compiling futures-sink v0.3.30 [INFO] [stderr] Compiling rustls-pemfile v2.1.3 [INFO] [stderr] Compiling pin-utils v0.1.0 [INFO] [stderr] Compiling serde_json v1.0.128 [INFO] [stderr] Compiling futures-task v0.3.30 [INFO] [stderr] Compiling getrandom v0.2.15 [INFO] [stderr] Compiling mio v1.0.2 [INFO] [stderr] Compiling socket2 v0.5.7 [INFO] [stderr] Compiling futures-util v0.3.30 [INFO] [stderr] Compiling rustls-native-certs v0.7.3 [INFO] [stderr] Compiling flume v0.11.0 [INFO] [stderr] Compiling ryu v1.0.18 [INFO] [stderr] Compiling itoa v1.0.11 [INFO] [stderr] Compiling memchr v2.7.4 [INFO] [stderr] Compiling ring v0.17.8 [INFO] [stderr] Compiling tokio-macros v2.4.0 [INFO] [stderr] Compiling thiserror-impl v1.0.63 [INFO] [stderr] Compiling serde_derive v1.0.210 [INFO] [stderr] Compiling tokio v1.40.0 [INFO] [stderr] Compiling rustls-webpki v0.102.8 [INFO] [stderr] Compiling tokio-rustls v0.25.0 [INFO] [stderr] Compiling rumqttc v0.24.0 [INFO] [stderr] Compiling mqtt-demo v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused imports: `ClientError` and `ConnectionError` [INFO] [stdout] --> src/main.rs:3:36 [INFO] [stdout] | [INFO] [stdout] 3 | use rumqttc::{AsyncClient, Client, ClientError, ConnectionError, Event, EventLoop, Incoming, MqttOptions, QoS}; [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] --> src/main.rs:45:40 [INFO] [stdout] | [INFO] [stdout] 45 | ... if (payload != "ON" && payload != "OFF") { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 45 - if (payload != "ON" && payload != "OFF") { [INFO] [stdout] 45 + if payload != "ON" && payload != "OFF" { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:16:10 [INFO] [stdout] | [INFO] [stdout] 16 | let (mut client, mut conn) = MqttClient::init(mqtt_config.clone()); [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | let mut state_t1 = Arc::clone(&state); [INFO] [stdout] | ----^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `driver` [INFO] [stdout] --> src/main.rs:134:13 [INFO] [stdout] | [INFO] [stdout] 134 | let driver = driver_name.clone(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_driver` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `config` and `client` are never read [INFO] [stdout] --> src/main.rs:152:5 [INFO] [stdout] | [INFO] [stdout] 151 | struct MqttClient { [INFO] [stdout] | ---------- fields in this struct [INFO] [stdout] 152 | config: MqttConfig, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 153 | client: Client, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `MqttClient` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/ha/ha.rs:21:88 [INFO] [stdout] | [INFO] [stdout] 21 | config_topic: std::format!("{}switch/{}/config",HOME_ASSISTANT_TOPIC_HEADER.clone() ,id.clone()), [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/ha/ha.rs:25:86 [INFO] [stdout] | [INFO] [stdout] 25 | command_topic: std::format!("{}switch/{}/set",HOME_ASSISTANT_TOPIC_HEADER.clone() ,id.clone()), [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/ha/ha.rs:26:91 [INFO] [stdout] | [INFO] [stdout] 26 | availability_topic: std::format!("{}switch/{}/ava",HOME_ASSISTANT_TOPIC_HEADER.clone() ,id.clone()), [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/ha/ha.rs:27:86 [INFO] [stdout] | [INFO] [stdout] 27 | state_topic: std::format!("{}switch/{}/state",HOME_ASSISTANT_TOPIC_HEADER.clone() ,id.clone()), [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 46.99s [INFO] running `Command { std: "docker" "inspect" "7cbedcf148959f801f931df221b09b674ab78f80c94d356bfb687f2b468cd668", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "7cbedcf148959f801f931df221b09b674ab78f80c94d356bfb687f2b468cd668", kill_on_drop: false }` [INFO] [stdout] 7cbedcf148959f801f931df221b09b674ab78f80c94d356bfb687f2b468cd668 [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:b0b074c097205a61b89e8ad263052f976b2b332c4dc5f02aef1fe52501660d6e" "/opt/rustwide/cargo-home/bin/cargo" "+414482f6a0d4e7290f614300581a0b55442552a3" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 2e76f758735736c6ea787ee89d858e8fc4021220145ab2e0f5c09eb72dfedd7c [INFO] running `Command { std: "docker" "start" "-a" "2e76f758735736c6ea787ee89d858e8fc4021220145ab2e0f5c09eb72dfedd7c", kill_on_drop: false }` [INFO] [stderr] Compiling mqtt-demo v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused imports: `ClientError` and `ConnectionError` [INFO] [stdout] --> src/main.rs:3:36 [INFO] [stdout] | [INFO] [stdout] 3 | use rumqttc::{AsyncClient, Client, ClientError, ConnectionError, Event, EventLoop, Incoming, MqttOptions, QoS}; [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] --> src/main.rs:45:40 [INFO] [stdout] | [INFO] [stdout] 45 | ... if (payload != "ON" && payload != "OFF") { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 45 - if (payload != "ON" && payload != "OFF") { [INFO] [stdout] 45 + if payload != "ON" && payload != "OFF" { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:16:10 [INFO] [stdout] | [INFO] [stdout] 16 | let (mut client, mut conn) = MqttClient::init(mqtt_config.clone()); [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | let mut state_t1 = Arc::clone(&state); [INFO] [stdout] | ----^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `driver` [INFO] [stdout] --> src/main.rs:134:13 [INFO] [stdout] | [INFO] [stdout] 134 | let driver = driver_name.clone(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_driver` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `config` and `client` are never read [INFO] [stdout] --> src/main.rs:152:5 [INFO] [stdout] | [INFO] [stdout] 151 | struct MqttClient { [INFO] [stdout] | ---------- fields in this struct [INFO] [stdout] 152 | config: MqttConfig, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 153 | client: Client, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `MqttClient` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/ha/ha.rs:21:88 [INFO] [stdout] | [INFO] [stdout] 21 | config_topic: std::format!("{}switch/{}/config",HOME_ASSISTANT_TOPIC_HEADER.clone() ,id.clone()), [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/ha/ha.rs:25:86 [INFO] [stdout] | [INFO] [stdout] 25 | command_topic: std::format!("{}switch/{}/set",HOME_ASSISTANT_TOPIC_HEADER.clone() ,id.clone()), [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/ha/ha.rs:26:91 [INFO] [stdout] | [INFO] [stdout] 26 | availability_topic: std::format!("{}switch/{}/ava",HOME_ASSISTANT_TOPIC_HEADER.clone() ,id.clone()), [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/ha/ha.rs:27:86 [INFO] [stdout] | [INFO] [stdout] 27 | state_topic: std::format!("{}switch/{}/state",HOME_ASSISTANT_TOPIC_HEADER.clone() ,id.clone()), [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.70s [INFO] running `Command { std: "docker" "inspect" "2e76f758735736c6ea787ee89d858e8fc4021220145ab2e0f5c09eb72dfedd7c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2e76f758735736c6ea787ee89d858e8fc4021220145ab2e0f5c09eb72dfedd7c", kill_on_drop: false }` [INFO] [stdout] 2e76f758735736c6ea787ee89d858e8fc4021220145ab2e0f5c09eb72dfedd7c [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:b0b074c097205a61b89e8ad263052f976b2b332c4dc5f02aef1fe52501660d6e" "/opt/rustwide/cargo-home/bin/cargo" "+414482f6a0d4e7290f614300581a0b55442552a3" "test" "--frozen", kill_on_drop: false }` [INFO] [stdout] 67b14991dcaacd636e8ae33566405ee493b227b11c40e9297131c6cb2dfd487b [INFO] running `Command { std: "docker" "start" "-a" "67b14991dcaacd636e8ae33566405ee493b227b11c40e9297131c6cb2dfd487b", kill_on_drop: false }` [INFO] [stderr] warning: unused imports: `ClientError` and `ConnectionError` [INFO] [stderr] --> src/main.rs:3:36 [INFO] [stderr] | [INFO] [stderr] 3 | use rumqttc::{AsyncClient, Client, ClientError, ConnectionError, Event, EventLoop, Incoming, MqttOptions, QoS}; [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_imports)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unnecessary parentheses around `if` condition [INFO] [stderr] --> src/main.rs:45:40 [INFO] [stderr] | [INFO] [stderr] 45 | ... if (payload != "ON" && payload != "OFF") { [INFO] [stderr] | ^ ^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_parens)]` on by default [INFO] [stderr] help: remove these parentheses [INFO] [stderr] | [INFO] [stderr] 45 - if (payload != "ON" && payload != "OFF") { [INFO] [stderr] 45 + if payload != "ON" && payload != "OFF" { [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: variable does not need to be mutable [INFO] [stderr] --> src/main.rs:16:10 [INFO] [stderr] | [INFO] [stderr] 16 | let (mut client, mut conn) = MqttClient::init(mqtt_config.clone()); [INFO] [stderr] | ----^^^^^^ [INFO] [stderr] | | [INFO] [stdout] [INFO] [stderr] | help: remove this `mut` [INFO] [stdout] running 0 tests [INFO] [stderr] | [INFO] [stdout] [INFO] [stderr] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s [INFO] [stderr] [INFO] [stdout] [INFO] [stderr] warning: variable does not need to be mutable [INFO] [stderr] --> src/main.rs:29:9 [INFO] [stderr] | [INFO] [stderr] 29 | let mut state_t1 = Arc::clone(&state); [INFO] [stderr] | ----^^^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: remove this `mut` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `driver` [INFO] [stderr] --> src/main.rs:134:13 [INFO] [stderr] | [INFO] [stderr] 134 | let driver = driver_name.clone(); [INFO] [stderr] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_driver` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_variables)]` on by default [INFO] [stderr] [INFO] [stderr] warning: fields `config` and `client` are never read [INFO] [stderr] --> src/main.rs:152:5 [INFO] [stderr] | [INFO] [stderr] 151 | struct MqttClient { [INFO] [stderr] | ---------- fields in this struct [INFO] [stderr] 152 | config: MqttConfig, [INFO] [stderr] | ^^^^^^ [INFO] [stderr] 153 | client: Client, [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `MqttClient` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stderr] = note: `#[warn(dead_code)]` on by default [INFO] [stderr] [INFO] [stderr] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stderr] --> src/ha/ha.rs:21:88 [INFO] [stderr] | [INFO] [stderr] 21 | config_topic: std::format!("{}switch/{}/config",HOME_ASSISTANT_TOPIC_HEADER.clone() ,id.clone()), [INFO] [stderr] | ^^^^^^^^ help: remove this redundant call [INFO] [stderr] | [INFO] [stderr] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stderr] = note: `#[warn(noop_method_call)]` on by default [INFO] [stderr] [INFO] [stderr] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stderr] --> src/ha/ha.rs:25:86 [INFO] [stderr] | [INFO] [stderr] 25 | command_topic: std::format!("{}switch/{}/set",HOME_ASSISTANT_TOPIC_HEADER.clone() ,id.clone()), [INFO] [stderr] | ^^^^^^^^ help: remove this redundant call [INFO] [stderr] | [INFO] [stderr] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stderr] [INFO] [stderr] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stderr] --> src/ha/ha.rs:26:91 [INFO] [stderr] | [INFO] [stderr] 26 | availability_topic: std::format!("{}switch/{}/ava",HOME_ASSISTANT_TOPIC_HEADER.clone() ,id.clone()), [INFO] [stderr] | ^^^^^^^^ help: remove this redundant call [INFO] [stderr] | [INFO] [stderr] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stderr] [INFO] [stderr] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stderr] --> src/ha/ha.rs:27:86 [INFO] [stderr] | [INFO] [stderr] 27 | state_topic: std::format!("{}switch/{}/state",HOME_ASSISTANT_TOPIC_HEADER.clone() ,id.clone()), [INFO] [stderr] | ^^^^^^^^ help: remove this redundant call [INFO] [stderr] | [INFO] [stderr] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stderr] [INFO] [stderr] warning: `mqtt-demo` (bin "mqtt-demo" test) generated 10 warnings (run `cargo fix --bin "mqtt-demo" --tests` to apply 8 suggestions) [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.12s [INFO] [stderr] Running unittests src/main.rs (/opt/rustwide/target/debug/deps/mqtt_demo-2a9e93c56c7d3a5e) [INFO] running `Command { std: "docker" "inspect" "67b14991dcaacd636e8ae33566405ee493b227b11c40e9297131c6cb2dfd487b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "67b14991dcaacd636e8ae33566405ee493b227b11c40e9297131c6cb2dfd487b", kill_on_drop: false }` [INFO] [stdout] 67b14991dcaacd636e8ae33566405ee493b227b11c40e9297131c6cb2dfd487b