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)
.append(true)
.create(true)
.open(&filepath)
.unwrap();
.open(&filepath)?;
let number = match get_history_number() {
Ok(n) => n + 1,