diff options
author | Lars Wirzenius <liw@liw.fi> | 2023-01-07 13:25:00 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2023-01-07 13:25:00 +0200 |
commit | 883aca2e45efd82aaee843f381df6303315d628e (patch) | |
tree | 2b0abcee8c9b2b7bc89acc40d14cac6b3e8ec9de | |
parent | 99dae6813e9db8b8f2f7ccc3dfb26d63baa9fc44 (diff) | |
download | riki-883aca2e45efd82aaee843f381df6303315d628e.tar.gz |
refactor: drop unnecessary boxing in PageError::Parser
Sponsored-by: author
-rw-r--r-- | src/page.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/page.rs b/src/page.rs index c8ac1dc..d84721c 100644 --- a/src/page.rs +++ b/src/page.rs @@ -1,7 +1,7 @@ use crate::directive::{Processed, Toc}; use crate::html::{parse, Content, Element, ElementTag, HtmlPage}; use crate::name::Name; -use crate::parser::{ParserError, WikitextParser}; +use crate::parser::WikitextParser; use crate::site::Site; use crate::util::get_mtime; use crate::wikitext::Snippet; @@ -27,13 +27,7 @@ pub enum PageError { Html(#[from] crate::html::HtmlError), #[error(transparent)] - Parser(#[from] Box<ParserError>), -} - -impl From<ParserError> for PageError { - fn from(e: ParserError) -> Self { - Self::Parser(Box::new(e)) - } + Parser(#[from] crate::parser::ParserError), } pub struct Page { |