Skip to content

Commit

Permalink
refactor(cache): idiomatic error handling
Browse files Browse the repository at this point in the history
Co-authored-by: Gabriel Nützi <[email protected]>
  • Loading branch information
cmdoret and gabyx authored Oct 22, 2024
1 parent f3cd9b1 commit 5bb08df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fuzon/src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ pub fn get_cache_key(sources: &Vec<&str>) -> Result<String> {
/// Get the full cross-platform cache path for a collection of source paths.
pub fn get_cache_path(sources: &Vec<&str>) -> Result<PathBuf> {
let cache_dir = dirs::cache_dir().unwrap().join("fuzon");
let cache_key = get_cache_key(&sources);
let cache_path = cache_dir.join(&cache_key?);
let cache_key = get_cache_key(&sources)?;
let cache_path = cache_dir.join(&cache_key);

return Ok(cache_path);
}
Expand Down

0 comments on commit 5bb08df

Please sign in to comment.