Fix libimagentrylist::listers::{path, line}::* for new StoreId interface
This commit is contained in:
parent
f3727ca686
commit
11e2af0c14
2 changed files with 4 additions and 2 deletions
|
@ -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))))
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -26,10 +26,12 @@ impl Lister for PathLister {
|
|||
fn list<'a, I: Iterator<Item = FileLockEntry<'a>>>(&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 {
|
||||
|
|
Loading…
Reference in a new issue