diff options
| author | Conrad Ludgate <conradludgate@gmail.com> | 2021-02-14 18:00:41 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-14 18:00:41 +0000 |
| commit | bae59474eef3fd28758a2a4e5e4fb8d50c93a3c4 (patch) | |
| tree | d0c85ade3768dc9b04f6d94c9d9b5c360a17c257 /src/local/import.rs | |
| parent | tidy some stuff (#6) (diff) | |
| download | atuin-bae59474eef3fd28758a2a4e5e4fb8d50c93a3c4.zip | |
a few more tiny touch ups (#7)
* a few more tiny touch ups
* all praise clippy
Diffstat (limited to 'src/local/import.rs')
| -rw-r--r-- | src/local/import.rs | 7 |
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")), } } } |
