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)
|
.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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user