Use StoreId::into_pathbuf() rather than ::into()
This commit is contained in:
parent
5f04d29345
commit
a53adb854d
1 changed files with 2 additions and 2 deletions
|
@ -3,6 +3,7 @@ use std::io::Write;
|
||||||
|
|
||||||
use lister::Lister;
|
use lister::Lister;
|
||||||
use result::Result;
|
use result::Result;
|
||||||
|
use error::MapErrInto;
|
||||||
|
|
||||||
use libimagstore::store::FileLockEntry;
|
use libimagstore::store::FileLockEntry;
|
||||||
use libimagutil::iter::FoldResult;
|
use libimagutil::iter::FoldResult;
|
||||||
|
@ -26,12 +27,11 @@ impl Lister for PathLister {
|
||||||
fn list<'a, I: Iterator<Item = FileLockEntry<'a>>>(&self, entries: I) -> Result<()> {
|
fn list<'a, I: Iterator<Item = FileLockEntry<'a>>>(&self, entries: I) -> Result<()> {
|
||||||
use error::ListError as LE;
|
use error::ListError as LE;
|
||||||
use error::ListErrorKind as LEK;
|
use error::ListErrorKind as LEK;
|
||||||
use std::path::PathBuf;
|
|
||||||
|
|
||||||
entries.fold_defresult(|entry| {
|
entries.fold_defresult(|entry| {
|
||||||
Ok(entry.get_location().clone())
|
Ok(entry.get_location().clone())
|
||||||
|
.and_then(|pb| pb.into_pathbuf().map_err_into(LEK::FormatError))
|
||||||
.and_then(|pb| {
|
.and_then(|pb| {
|
||||||
let pb : PathBuf = pb.into();
|
|
||||||
if self.absolute {
|
if self.absolute {
|
||||||
pb.canonicalize().map_err(|e| LE::new(LEK::FormatError, Some(Box::new(e))))
|
pb.canonicalize().map_err(|e| LE::new(LEK::FormatError, Some(Box::new(e))))
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue