fix clippy lints and improve error handling
This commit is contained in:
parent
aeaa6eb3a6
commit
dd0ad8d538
5 changed files with 21 additions and 6 deletions
|
@ -94,7 +94,8 @@ impl Calendar {
|
|||
}
|
||||
|
||||
pub(crate) fn read_from_config(config: Config) -> Result<Self> {
|
||||
let s = std::fs::read_to_string(&config.dl.file_path)?;
|
||||
let path = &config.dl.file_path;
|
||||
let s = std::fs::read_to_string(path).with_context(|| format!("Couldn't read {path:?}"))?;
|
||||
Self::read_from_str(config, &s)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue