diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index ad35d20..625e869 100644 --- a/src/main.rs +++ b/src/main.rs @@ -344,7 +344,7 @@ fn maybe_save_history(rl: &Editor<()>, path: Option<&Path>) { debug!("Saving history to {:?}", path); let parent = path .parent() - .ok_or(anyhow!("Path does not have a parent"))?; + .ok_or_else(|| anyhow!("Path does not have a parent"))?; fs::create_dir_all(parent).context("Could not create directory")?; rl.save_history(path)?; Ok(()) |