aboutsummaryrefslogtreecommitdiffstats
path: root/src/local/import.rs
diff options
context:
space:
mode:
authorConrad Ludgate <conradludgate@gmail.com>2021-02-14 18:00:41 +0000
committerGitHub <noreply@github.com>2021-02-14 18:00:41 +0000
commitbae59474eef3fd28758a2a4e5e4fb8d50c93a3c4 (patch)
treed0c85ade3768dc9b04f6d94c9d9b5c360a17c257 /src/local/import.rs
parenttidy some stuff (#6) (diff)
downloadatuin-bae59474eef3fd28758a2a4e5e4fb8d50c93a3c4.zip
a few more tiny touch ups (#7)
* a few more tiny touch ups * all praise clippy
Diffstat (limited to '')
-rw-r--r--src/local/import.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/local/import.rs b/src/local/import.rs
index 858e5786..ddccc75a 100644
--- a/src/local/import.rs
+++ b/src/local/import.rs
@@ -4,9 +4,9 @@
use std::io::{BufRead, BufReader, Seek, SeekFrom};
use std::{fs::File, path::Path};
-use eyre::{eyre, Result};
+use eyre::{Result, WrapErr};
-use crate::local::history::History;
+use super::history::History;
#[derive(Debug)]
pub struct Zsh {
@@ -72,8 +72,6 @@ impl Iterator for Zsh {
match self.file.read_line(&mut line) {
Ok(0) => None,
- Err(e) => Some(Err(eyre!("failed to parse line: {}", e))),
-
Ok(_) => {
let extended = line.starts_with(':');
@@ -91,6 +89,7 @@ impl Iterator for Zsh {
)))
}
}
+ Err(e) => Some(Err(e).wrap_err("failed to parse line")),
}
}
}