Skip to content

Commit

Permalink
Clean up error handling further
Browse files Browse the repository at this point in the history
  • Loading branch information
uncenter committed Dec 10, 2024
1 parent 2801b4a commit 967d013
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl Config {

let path = match paths.into_iter().find(|p| p.exists()) {
Some(path) => path,
None => return Ok(Self::try_config_default()?),
None => return Self::try_config_default(),
};

let contents = fs::read_to_string(path)?;
Expand All @@ -47,7 +47,7 @@ impl Config {
} else {
toml::from_str(&contents)?
};
Ok(Self::from_entry_config(&entry_config)?)
Self::from_entry_config(&entry_config)
}

/// This method does not look for the config file and uses [`EntryConfig`]'s defaults instead.
Expand Down

0 comments on commit 967d013

Please sign in to comment.