diff options
Diffstat (limited to 'src/paths.rs')
-rw-r--r-- | src/paths.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/paths.rs b/src/paths.rs index f219dc4..bebe0ee 100644 --- a/src/paths.rs +++ b/src/paths.rs @@ -4,10 +4,8 @@ use super::APP_NAME; use std::path::PathBuf; /// Returns the path that should be used for the cache. -pub fn cache_path() -> PathBuf { - let mut cache_path = dirs::cache_dir().unwrap(); - cache_path.push(APP_NAME); - cache_path +pub fn cache_path() -> Option<PathBuf> { + dirs::cache_dir().map(|p| p.join(APP_NAME)) } /// Returns the path that should be used for the REPL history. |