Better error handling for history
This commit is contained in:
parent
847c8bf736
commit
681d96ba0f
@ -12,8 +12,8 @@ pub fn write_to_history(command: &str) -> Result<(), std::io::Error> {
|
||||
.write(true)
|
||||
.append(true)
|
||||
.create(true)
|
||||
.open(&filepath)
|
||||
.unwrap();
|
||||
.open(&filepath)?;
|
||||
|
||||
|
||||
let number = match get_history_number() {
|
||||
Ok(n) => n + 1,
|
||||
|
Loading…
x
Reference in New Issue
Block a user