[librsvg: 22/26] document: remove uneeded map_err



commit cb624424f09858e646c215ce8f1e33f0e4660d52
Author: Paolo Borelli <pborelli gnome org>
Date:   Sat Nov 9 22:39:43 2019 +0100

    document: remove uneeded map_err

 rsvg_internals/src/document.rs | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/rsvg_internals/src/document.rs b/rsvg_internals/src/document.rs
index cfa31dcc..447cd9d3 100644
--- a/rsvg_internals/src/document.rs
+++ b/rsvg_internals/src/document.rs
@@ -6,7 +6,7 @@ use std::collections::hash_map::Entry;
 use std::collections::HashMap;
 use std::rc::Rc;
 
-use crate::allowed_url::{AllowedUrl, Fragment};
+use crate::allowed_url::{AllowedUrl, AllowedUrlError, Fragment};
 use crate::create_node::create_node;
 use crate::css::Stylesheet;
 use crate::error::LoadingError;
@@ -315,9 +315,8 @@ impl DocumentBuilder {
         chars_node.borrow().get_impl::<NodeChars>().append(text);
     }
 
-    pub fn resolve_href(&self, href: &str) -> Result<AllowedUrl, LoadingError> {
+    pub fn resolve_href(&self, href: &str) -> Result<AllowedUrl, AllowedUrlError> {
         AllowedUrl::from_href(href, self.load_options.base_url.as_ref())
-            .map_err(|_| LoadingError::BadUrl)
     }
 
     pub fn build(self) -> Result<Document, LoadingError> {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]