From a53adb854dd0557de4b37d2e03c66fac29723e21 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 6 Sep 2016 09:40:27 +0200 Subject: [PATCH] Use StoreId::into_pathbuf() rather than ::into() --- libimagentrylist/src/listers/path.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libimagentrylist/src/listers/path.rs b/libimagentrylist/src/listers/path.rs index 8b982315..cfe67b65 100644 --- a/libimagentrylist/src/listers/path.rs +++ b/libimagentrylist/src/listers/path.rs @@ -3,6 +3,7 @@ use std::io::Write; use lister::Lister; use result::Result; +use error::MapErrInto; use libimagstore::store::FileLockEntry; use libimagutil::iter::FoldResult; @@ -26,12 +27,11 @@ 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| pb.into_pathbuf().map_err_into(LEK::FormatError)) .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 {