summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2017-10-30 20:17:21 +0100
committerMatthias Beyer <mail@beyermatthias.de>2017-10-31 15:04:50 +0100
commitd60f7d72e6229bb5ed0005923f30923d66f2f2a0 (patch)
treee7d3de02b3b3dde9e661887dabd11fedc8a6da0d
parentda391954ccbc6f1a6f82c30a1b9d5e62a63a4a0a (diff)
Replace uses of try!() macro with "?" operator
-rw-r--r--lib/entry/libimagentrylist/src/listers/line.rs2
-rw-r--r--lib/entry/libimagentrylist/src/listers/path.rs6
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/entry/libimagentrylist/src/listers/line.rs b/lib/entry/libimagentrylist/src/listers/line.rs
index b4c2639b..8f89e66e 100644
--- a/lib/entry/libimagentrylist/src/listers/line.rs
+++ b/lib/entry/libimagentrylist/src/listers/line.rs
@@ -47,7 +47,7 @@ impl<'a> Lister for LineLister<'a> {
for entry in entries {
let s = entry.get_location().to_str().unwrap_or(String::from(self.unknown_output));
- try!(write!(stdout(), "{:?}\n", s).chain_err(|| LEK::FormatError))
+ write!(stdout(), "{:?}\n", s).chain_err(|| LEK::FormatError)?
}
Ok(())
diff --git a/lib/entry/libimagentrylist/src/listers/path.rs b/lib/entry/libimagentrylist/src/listers/path.rs
index f45239d6..b88d43fa 100644
--- a/lib/entry/libimagentrylist/src/listers/path.rs
+++ b/lib/entry/libimagentrylist/src/listers/path.rs
@@ -47,14 +47,14 @@ impl Lister for PathLister {
for entry in entries {
let pb = entry.get_location().clone();
- let pb = try!(pb.into_pathbuf().chain_err(|| LEK::FormatError));
+ let pb = pb.into_pathbuf().chain_err(|| LEK::FormatError)?;
let pb = if self.absolute {
- try!(pb.canonicalize().chain_err(|| LEK::FormatError))
+ pb.canonicalize().chain_err(|| LEK::FormatError)?
} else {
pb.into()
};
- try!(write!(stdout(), "{:?}\n", pb).chain_err(|| LEK::FormatError))
+ write!(stdout(), "{:?}\n", pb).chain_err(|| LEK::FormatError)?
}
Ok(())