From 81ceb50f4a06f58f152499e32bbd770d70c1b2be Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Mon, 30 Oct 2017 20:17:21 +0100 Subject: [PATCH] Replace uses of try!() macro with "?" operator --- lib/entry/libimagentrymarkdown/src/processor.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/entry/libimagentrymarkdown/src/processor.rs b/lib/entry/libimagentrymarkdown/src/processor.rs index f0036497..943990a0 100644 --- a/lib/entry/libimagentrymarkdown/src/processor.rs +++ b/lib/entry/libimagentrymarkdown/src/processor.rs @@ -116,7 +116,7 @@ impl LinkProcessor { let spath = Some(store.path().clone()); let id = StoreId::new(spath, PathBuf::from(&link.link))?; let mut target = if self.create_internal_targets { - try!(store.retrieve(id)) + store.retrieve(id)? } else { store.get(id.clone())? .ok_or(ME::from_kind(MEK::StoreGetError(id)))? @@ -144,7 +144,7 @@ impl LinkProcessor { trace!("URL.host_str() = {:?}", url.host_str()); let path = url.host_str().unwrap_or_else(|| url.path()); let path = PathBuf::from(path); - let mut target = try!(RefStore::create(store, path, flags)); + let mut target = RefStore::create(store, path, flags)?; entry.add_internal_link(&mut target)?; },