From bae59474eef3fd28758a2a4e5e4fb8d50c93a3c4 Mon Sep 17 00:00:00 2001 From: Conrad Ludgate Date: Sun, 14 Feb 2021 18:00:41 +0000 Subject: a few more tiny touch ups (#7) * a few more tiny touch ups * all praise clippy --- src/local/import.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/local/import.rs') 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")), } } } -- cgit v1.3.1