Better error handling for history

This commit is contained in:
Justine 2023-01-31 17:35:16 +01:00
parent 847c8bf736
commit 681d96ba0f

View File

@ -12,8 +12,8 @@ pub fn write_to_history(command: &str) -> Result<(), std::io::Error> {
.write(true) .write(true)
.append(true) .append(true)
.create(true) .create(true)
.open(&filepath) .open(&filepath)?;
.unwrap();
let number = match get_history_number() { let number = match get_history_number() {
Ok(n) => n + 1, Ok(n) => n + 1,