diff --git a/libimagentrylist/src/listers/line.rs b/libimagentrylist/src/listers/line.rs index a5af428b..536d2039 100644 --- a/libimagentrylist/src/listers/line.rs +++ b/libimagentrylist/src/listers/line.rs @@ -28,8 +28,8 @@ impl<'a> Lister for LineLister<'a> { use error::ListErrorKind as LEK; entries.fold_defresult(|entry| { - write!(stdout(), "{:?}\n", entry.get_location().to_str().unwrap_or(self.unknown_output)) - .map_err(|e| LE::new(LEK::FormatError, Some(Box::new(e)))) + let s = entry.get_location().to_str().unwrap_or(String::from(self.unknown_output)); + write!(stdout(), "{:?}\n", s).map_err(|e| LE::new(LEK::FormatError, Some(Box::new(e)))) }) } diff --git a/libimagentrylist/src/listers/path.rs b/libimagentrylist/src/listers/path.rs index 503b2478..8b982315 100644 --- a/libimagentrylist/src/listers/path.rs +++ b/libimagentrylist/src/listers/path.rs @@ -26,10 +26,12 @@ impl Lister for PathLister { fn list<'a, I: Iterator>>(&self, entries: I) -> Result<()> { use error::ListError as LE; use error::ListErrorKind as LEK; + use std::path::PathBuf; entries.fold_defresult(|entry| { Ok(entry.get_location().clone()) .and_then(|pb| { + let pb : PathBuf = pb.into(); if self.absolute { pb.canonicalize().map_err(|e| LE::new(LEK::FormatError, Some(Box::new(e)))) } else {