Skip to content

Commit

Permalink
style: fmt settings manager
Browse files Browse the repository at this point in the history
  • Loading branch information
maxjoehnk committed Aug 11, 2024
1 parent ede6a70 commit d2f37f5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions crates/runtime/settings/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,7 @@ impl SettingsManager {
pub fn new() -> anyhow::Result<Self> {
let settings = toml::from_str(&[DEFAULT_SETTINGS, DEFAULT_HOTKEYS].concat())?;

Ok(Self {
settings,
})
Ok(Self { settings })
}

pub fn load(&mut self) -> anyhow::Result<()> {
Expand Down Expand Up @@ -167,7 +165,8 @@ impl SettingsManager {
}

pub fn save(&self) -> anyhow::Result<()> {
let file_path = Self::get_config_path().ok_or_else(|| anyhow::anyhow!("No config path found"))?;
let file_path =
Self::get_config_path().ok_or_else(|| anyhow::anyhow!("No config path found"))?;

self.settings.save_to(file_path)
}
Expand Down

0 comments on commit d2f37f5

Please sign in to comment.