From 11e2af0c142e9c135a5eae016ba7feb4ad32bfba Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 25 Aug 2016 18:24:52 +0200 Subject: [PATCH] Fix libimagentrylist::listers::{path, line}::* for new StoreId interface --- libimagentrylist/src/listers/line.rs | 4 ++-- libimagentrylist/src/listers/path.rs | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) 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 {