[librsvg] DrawingCtx: remove helper methods get_acquired_href*()
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] DrawingCtx: remove helper methods get_acquired_href*()
- Date: Fri, 30 Nov 2018 00:32:21 +0000 (UTC)
commit ae68b5b030a36d105393db7578413b0c528814e4
Author: Federico Mena Quintero <federico gnome org>
Date: Thu Nov 29 18:27:10 2018 -0600
DrawingCtx: remove helper methods get_acquired_href*()
Now everything is converted to use Fragment instead of strings. Yay!
rsvg_internals/src/drawing_ctx.rs | 34 +---------------------------------
1 file changed, 1 insertion(+), 33 deletions(-)
---
diff --git a/rsvg_internals/src/drawing_ctx.rs b/rsvg_internals/src/drawing_ctx.rs
index 124475e9..637d8898 100644
--- a/rsvg_internals/src/drawing_ctx.rs
+++ b/rsvg_internals/src/drawing_ctx.rs
@@ -13,7 +13,7 @@ use std::rc::{Rc, Weak};
use bbox::BoundingBox;
use clip_path::{ClipPathUnits, NodeClipPath};
use coord_units::CoordUnits;
-use defs::{Defs, Fragment, Href, RsvgDefs};
+use defs::{Defs, Fragment, RsvgDefs};
use error::RenderingError;
use filters;
use float_eq_cairo::ApproxEqCairo;
@@ -282,38 +282,6 @@ impl<'a> DrawingCtx<'a> {
&self.bbox
}
- // This function will go away once all callers are converted to call
- // get_acquired_node() with an actual Fragment.
- pub fn get_acquired_href(&mut self, url: &str) -> Option<AcquiredNode> {
- let href = Href::parse(url).ok()?;
-
- let fragment = match href {
- Href::WithFragment(f) => f,
- _ => return None,
- };
-
- self.get_acquired_node(&fragment)
- }
-
- // This function will go away once all callers are converted to call
- // get_acquired_node_of_type() with an actual Fragment.
- pub fn get_acquired_href_of_type(
- &mut self,
- url: Option<&str>,
- node_type: NodeType,
- ) -> Option<AcquiredNode> {
- url.and_then(|url| {
- let href = Href::parse(url).ok()?;
-
- let fragment = match href {
- Href::WithFragment(f) => f,
- _ => return None,
- };
-
- self.get_acquired_node_of_type(Some(&fragment), node_type)
- })
- }
-
// Use this function when looking up urls to other nodes. This function
// does proper recursion checking and thereby avoids infinite loops.
//
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]