Skip to content

Commit 47b1556

Browse files
committed
chore: cleanup
1 parent 56539c4 commit 47b1556

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

intouch2-mqtt/src/main.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,13 @@ struct MqttAuthOptions {
216216
impl MqttAuthOptions {
217217
pub fn fill_defaults(&mut self) {
218218
if let target @ None = &mut self.target {
219-
*target = std::env::var("MQTT_SERVER").map(|x| x.into()).ok();
219+
*target = env::var("MQTT_SERVER").map(|x| x.into()).ok();
220220
}
221221
if let username @ None = &mut self.username {
222-
*username = std::env::var("MQTT_USER").map(|x| x.into()).ok();
222+
*username = env::var("MQTT_USER").map(|x| x.into()).ok();
223223
}
224224
if let password @ None = &mut self.password {
225-
*password = std::env::var("MQTT_PASSWORD").map(|x| x.into()).ok();
225+
*password = env::var("MQTT_PASSWORD").map(|x| x.into()).ok();
226226
}
227227
}
228228
}
@@ -232,8 +232,8 @@ impl Command {
232232
static ARGS: OnceLock<Command> = OnceLock::new();
233233
ARGS.get_or_init(|| {
234234
let config_file =
235-
std::env::var("CONFIG_FILE").unwrap_or_else(|_| "/data/options.json".into());
236-
if std::env::args_os().len() <= 1 {
235+
env::var("CONFIG_FILE").unwrap_or_else(|_| "/data/options.json".into());
236+
if env::args_os().len() <= 1 {
237237
let span_read_config = trace_span!("read config", config_file);
238238
let _ = span_read_config.enter();
239239
if let Ok(config_file) = std::fs::read(config_file) {

0 commit comments

Comments
 (0)