From 3a2c06747995b9bf9e56a11595daa85797655227 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonard=20G=C3=B6hrs?= Date: Fri, 23 Feb 2024 14:37:53 +0100 Subject: [PATCH 1/4] backlight: only import demo_mode module in demo mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Leonard Göhrs --- src/backlight.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/backlight.rs b/src/backlight.rs index 9bec66f7..e76ec477 100644 --- a/src/backlight.rs +++ b/src/backlight.rs @@ -20,6 +20,7 @@ use async_std::prelude::*; use async_std::sync::Arc; use log::warn; +#[cfg(feature = "demo_mode")] mod demo_mode; #[cfg(feature = "demo_mode")] From fc7b6173b7cfc891366a3a57f88fa1b6328e4a2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonard=20G=C3=B6hrs?= Date: Fri, 23 Feb 2024 14:38:21 +0100 Subject: [PATCH 2/4] led: only import demo_mode module in demo mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Leonard Göhrs --- src/led.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/led.rs b/src/led.rs index f4a2373a..59b5a92f 100644 --- a/src/led.rs +++ b/src/led.rs @@ -25,7 +25,9 @@ use log::{error, info, warn}; use crate::broker::{BrokerBuilder, Topic}; use crate::watched_tasks::WatchedTasksBuilder; +#[cfg(feature = "demo_mode")] mod demo_mode; + mod extras; #[cfg(feature = "demo_mode")] From 691e967d23690418b42916fd8b9a81029b00ca74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonard=20G=C3=B6hrs?= Date: Fri, 23 Feb 2024 14:42:17 +0100 Subject: [PATCH 3/4] broker: mqtt_conn: do not import what is already imported via wildcard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Leonard Göhrs --- src/broker/mqtt_conn.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/broker/mqtt_conn.rs b/src/broker/mqtt_conn.rs index dd05ff4f..d16a5302 100644 --- a/src/broker/mqtt_conn.rs +++ b/src/broker/mqtt_conn.rs @@ -40,7 +40,6 @@ use futures_util::future::Either; use futures_util::{FutureExt, SinkExt, StreamExt}; use mqtt::control::variable_header::{ConnectReturnCode, ProtocolLevel}; -use mqtt::packet::publish::QoSWithPacketIdentifier; use mqtt::packet::suback::SubscribeReturnCode; use mqtt::TopicFilter; use mqtt::{packet::*, Decodable, Encodable}; From 2d454dce72e645a47a20ca46000a4d0f9fbe23d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonard=20G=C3=B6hrs?= Date: Fri, 23 Feb 2024 14:39:20 +0100 Subject: [PATCH 4/4] dbus: networkmanager: do not "use async_std" as it is already in scope MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We can just use dependencies listed in Cargo.toml under their name without having to explicitly "use" them. Signed-off-by: Leonard Göhrs --- src/dbus/networkmanager.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/dbus/networkmanager.rs b/src/dbus/networkmanager.rs index 99d424bd..9db6795d 100644 --- a/src/dbus/networkmanager.rs +++ b/src/dbus/networkmanager.rs @@ -16,7 +16,6 @@ // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. use anyhow::Result; -use async_std; use async_std::sync::Arc; use serde::{Deserialize, Serialize};