summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2023-01-07 13:24:00 +0200
committerLars Wirzenius <liw@liw.fi>2023-01-07 13:24:00 +0200
commit99dae6813e9db8b8f2f7ccc3dfb26d63baa9fc44 (patch)
tree5d772728db99871f69e0a8d495c93ecd88f569a8
parent25e24fb5f971498c19d5b3fae80494d973217990 (diff)
downloadriki-99dae6813e9db8b8f2f7ccc3dfb26d63baa9fc44.tar.gz
refactor: drop unnecessary boxing of value in PageError::Html
Sponsored-by: author
-rw-r--r--src/page.rs9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/page.rs b/src/page.rs
index ba4c55f..c8ac1dc 100644
--- a/src/page.rs
+++ b/src/page.rs
@@ -1,5 +1,4 @@
use crate::directive::{Processed, Toc};
-use crate::html::HtmlError;
use crate::html::{parse, Content, Element, ElementTag, HtmlPage};
use crate::name::Name;
use crate::parser::{ParserError, WikitextParser};
@@ -25,18 +24,12 @@ pub enum PageError {
Wikitext(#[from] crate::wikitext::WikitextError),
#[error(transparent)]
- Html(#[from] Box<HtmlError>),
+ Html(#[from] crate::html::HtmlError),
#[error(transparent)]
Parser(#[from] Box<ParserError>),
}
-impl From<HtmlError> for PageError {
- fn from(e: HtmlError) -> Self {
- Self::Html(Box::new(e))
- }
-}
-
impl From<ParserError> for PageError {
fn from(e: ParserError) -> Self {
Self::Parser(Box::new(e))