[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 try#7af779037716ae4125ceabb429791b4cf5dd0a43 for pr-136932 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fvczr%2Fha-switch-mqtt" "/workspace/builds/worker-6-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/vczr/ha-switch-mqtt on toolchain 7af779037716ae4125ceabb429791b4cf5dd0a43 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+7af779037716ae4125ceabb429791b4cf5dd0a43" "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-6-tc2/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" "+7af779037716ae4125ceabb429791b4cf5dd0a43" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded rumqttc v0.24.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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:3959728d45483eb673ba100a951a6b9f5012970368db2a9e08e0ac9b67c8a5ad" "/opt/rustwide/cargo-home/bin/cargo" "+7af779037716ae4125ceabb429791b4cf5dd0a43" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 9529b1700eecd00e0c09aa7ee6a6070d3d5f07ac8d7d7ab61574660b07bd566a [INFO] running `Command { std: "docker" "start" "-a" "9529b1700eecd00e0c09aa7ee6a6070d3d5f07ac8d7d7ab61574660b07bd566a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "9529b1700eecd00e0c09aa7ee6a6070d3d5f07ac8d7d7ab61574660b07bd566a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9529b1700eecd00e0c09aa7ee6a6070d3d5f07ac8d7d7ab61574660b07bd566a", kill_on_drop: false }` [INFO] [stdout] 9529b1700eecd00e0c09aa7ee6a6070d3d5f07ac8d7d7ab61574660b07bd566a [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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:3959728d45483eb673ba100a951a6b9f5012970368db2a9e08e0ac9b67c8a5ad" "/opt/rustwide/cargo-home/bin/cargo" "+7af779037716ae4125ceabb429791b4cf5dd0a43" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 2e6732f35d454d92834b543d2990a68aa2f6076d304b89960aad75a836e67942 [INFO] running `Command { std: "docker" "start" "-a" "2e6732f35d454d92834b543d2990a68aa2f6076d304b89960aad75a836e67942", kill_on_drop: false }` [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 lock_api v0.4.12 [INFO] [stderr] Compiling rustls-pki-types v1.8.0 [INFO] [stderr] Compiling cc v1.1.18 [INFO] [stderr] Compiling untrusted v0.9.0 [INFO] [stderr] Compiling slab v0.4.9 [INFO] [stderr] Compiling pin-project-lite v0.2.14 [INFO] [stderr] Compiling rustls v0.22.4 [INFO] [stderr] Compiling bytes v1.7.1 [INFO] [stderr] Compiling zeroize v1.8.1 [INFO] [stderr] Compiling subtle v2.6.1 [INFO] [stderr] Compiling serde v1.0.210 [INFO] [stderr] Compiling futures-core v0.3.30 [INFO] [stderr] Compiling log v0.4.22 [INFO] [stderr] Compiling base64 v0.22.1 [INFO] [stderr] Compiling pin-utils v0.1.0 [INFO] [stderr] Compiling futures-task v0.3.30 [INFO] [stderr] Compiling serde_json v1.0.128 [INFO] [stderr] Compiling openssl-probe v0.1.5 [INFO] [stderr] Compiling futures-sink v0.3.30 [INFO] [stderr] Compiling futures-util v0.3.30 [INFO] [stderr] Compiling rustls-pemfile v2.1.3 [INFO] [stderr] Compiling spin v0.9.8 [INFO] [stderr] Compiling rustls-native-certs v0.7.3 [INFO] [stderr] Compiling flume v0.11.0 [INFO] [stderr] Compiling quote v1.0.37 [INFO] [stderr] Compiling syn v2.0.77 [INFO] [stderr] Compiling getrandom v0.2.15 [INFO] [stderr] Compiling mio v1.0.2 [INFO] [stderr] Compiling socket2 v0.5.7 [INFO] [stderr] Compiling ring v0.17.8 [INFO] [stderr] Compiling tokio-macros v2.4.0 [INFO] [stderr] Compiling serde_derive v1.0.210 [INFO] [stderr] Compiling thiserror-impl v1.0.63 [INFO] [stderr] Compiling tokio v1.40.0 [INFO] [stderr] Compiling thiserror v1.0.63 [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 24.48s [INFO] running `Command { std: "docker" "inspect" "2e6732f35d454d92834b543d2990a68aa2f6076d304b89960aad75a836e67942", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2e6732f35d454d92834b543d2990a68aa2f6076d304b89960aad75a836e67942", kill_on_drop: false }` [INFO] [stdout] 2e6732f35d454d92834b543d2990a68aa2f6076d304b89960aad75a836e67942 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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:3959728d45483eb673ba100a951a6b9f5012970368db2a9e08e0ac9b67c8a5ad" "/opt/rustwide/cargo-home/bin/cargo" "+7af779037716ae4125ceabb429791b4cf5dd0a43" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] bcb0afaa4ee9a835e153bf9fb393435e32836842c5a642ff6c3810498140fc64 [INFO] running `Command { std: "docker" "start" "-a" "bcb0afaa4ee9a835e153bf9fb393435e32836842c5a642ff6c3810498140fc64", 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.61s [INFO] running `Command { std: "docker" "inspect" "bcb0afaa4ee9a835e153bf9fb393435e32836842c5a642ff6c3810498140fc64", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "bcb0afaa4ee9a835e153bf9fb393435e32836842c5a642ff6c3810498140fc64", kill_on_drop: false }` [INFO] [stdout] bcb0afaa4ee9a835e153bf9fb393435e32836842c5a642ff6c3810498140fc64 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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:3959728d45483eb673ba100a951a6b9f5012970368db2a9e08e0ac9b67c8a5ad" "/opt/rustwide/cargo-home/bin/cargo" "+7af779037716ae4125ceabb429791b4cf5dd0a43" "test" "--frozen", kill_on_drop: false }` [INFO] [stdout] 58a758b547b9133388710edc0a7660f4ab6f853e13d9c373d3d288eb0db3a262 [INFO] running `Command { std: "docker" "start" "-a" "58a758b547b9133388710edc0a7660f4ab6f853e13d9c373d3d288eb0db3a262", 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] [stderr] | help: remove this `mut` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_mut)]` on by default [INFO] [stderr] [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.10s [INFO] [stderr] Running unittests src/main.rs (/opt/rustwide/target/debug/deps/mqtt_demo-2a9e93c56c7d3a5e) [INFO] [stdout] [INFO] [stdout] running 0 tests [INFO] [stdout] [INFO] [stdout] test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "58a758b547b9133388710edc0a7660f4ab6f853e13d9c373d3d288eb0db3a262", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "58a758b547b9133388710edc0a7660f4ab6f853e13d9c373d3d288eb0db3a262", kill_on_drop: false }` [INFO] [stdout] 58a758b547b9133388710edc0a7660f4ab6f853e13d9c373d3d288eb0db3a262