clippy
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use serde::Deserialize;
|
||||
use std::default::Default;
|
||||
use std::fs;
|
||||
|
||||
#[derive(Deserialize, Debug, Clone, Default)]
|
||||
@@ -10,8 +11,7 @@ impl Config {
|
||||
pub fn load() -> Config {
|
||||
fs::read_to_string("jmb-bar.conf")
|
||||
.ok()
|
||||
.map(|s| toml::from_str::<Config>(&s).ok())
|
||||
.flatten()
|
||||
.and_then(|s| toml::from_str::<Config>(&s).ok())
|
||||
.unwrap_or_default()
|
||||
}
|
||||
}
|
||||
@@ -33,7 +33,8 @@ impl Default for IdleConfig {
|
||||
dim_timeout: 60,
|
||||
lock_timeout: 300,
|
||||
sleep_timeout: 320,
|
||||
..Default::default()
|
||||
lock_command: String::default(),
|
||||
sleep_command: String::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user