Replace uses of try!() macro with "?" operator
This commit is contained in:
parent
d5f537dc4d
commit
ee7b04dd42
1 changed files with 2 additions and 2 deletions
|
@ -254,12 +254,12 @@ fn main() {
|
|||
}
|
||||
|
||||
fn fetch_aliases(rt: &Runtime) -> Result<BTreeMap<String, String>, String> {
|
||||
let cfg = try!(rt.config().ok_or_else(|| String::from("No configuration found")));
|
||||
let cfg = rt.config().ok_or_else(|| String::from("No configuration found"))?;
|
||||
let value = cfg
|
||||
.read("imag.aliases")
|
||||
.map_err(|_| String::from("Reading from config failed"));
|
||||
|
||||
match try!(value) {
|
||||
match value? {
|
||||
None => Ok(BTreeMap::new()),
|
||||
Some(&Value::Table(ref tbl)) => {
|
||||
let mut alias_mappings = BTreeMap::new();
|
||||
|
|
Loading…
Reference in a new issue