summaryrefslogtreecommitdiff
path: root/src/wikitext.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/wikitext.rs')
-rw-r--r--src/wikitext.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/wikitext.rs b/src/wikitext.rs
index 2561ce5..f8f4ce6 100644
--- a/src/wikitext.rs
+++ b/src/wikitext.rs
@@ -44,14 +44,15 @@ impl Snippet {
Snippet::Directive(p) => {
let e = Directive::try_from(p);
if let Ok(d) = e {
- d.process(site, meta)
- .map_err(|e| RikiError::PageProblem(meta.path().into(), Box::new(e)))?
+ d.process(site, meta).map_err(|e| {
+ RikiError::PageProblem(meta.path().into(), Box::new(e.into()))
+ })?
} else if let Some(shortcut) = site.shortcut(p.name()) {
let arg = p.unnamed_args().first().unwrap().to_string();
let link = format!("[{}]({})", shortcut.desc(&arg), shortcut.url(&arg));
Processed::Markdown(link)
} else {
- return Err(e.unwrap_err());
+ return Err(e.unwrap_err().into());
}
}
};