[librsvg: 4/7] Rename NodeData::new() to ::new_element()
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 4/7] Rename NodeData::new() to ::new_element()
- Date: Fri, 13 Mar 2020 01:58:09 +0000 (UTC)
commit 057d22feda6c7057796fa4e51ebf2c723f2f4af2
Author: Federico Mena Quintero <federico gnome org>
Date: Wed Mar 11 18:38:25 2020 -0600
Rename NodeData::new() to ::new_element()
rsvg_internals/src/create_node.rs | 2 +-
rsvg_internals/src/gradient.rs | 4 ++--
rsvg_internals/src/node.rs | 4 ++--
rsvg_internals/src/pattern.rs | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/rsvg_internals/src/create_node.rs b/rsvg_internals/src/create_node.rs
index 92e71734..e3096c60 100644
--- a/rsvg_internals/src/create_node.rs
+++ b/rsvg_internals/src/create_node.rs
@@ -46,7 +46,7 @@ use crate::text::{TRef, TSpan, Text};
macro_rules! n {
($name:ident, $node_type:ident) => {
pub fn $name(element_name: &QualName, id: Option<&str>, class: Option<&str>) -> RsvgNode {
- RsvgNode::new(NodeData::new(
+ RsvgNode::new(NodeData::new_element(
NodeType::$node_type,
element_name,
id,
diff --git a/rsvg_internals/src/gradient.rs b/rsvg_internals/src/gradient.rs
index c6741659..db44c184 100644
--- a/rsvg_internals/src/gradient.rs
+++ b/rsvg_internals/src/gradient.rs
@@ -843,7 +843,7 @@ mod tests {
#[test]
fn gradient_resolved_from_defaults_is_really_resolved() {
- let node = RsvgNode::new(NodeData::new(
+ let node = RsvgNode::new(NodeData::new_element(
NodeType::LinearGradient,
&QualName::new(None, ns!(svg), local_name!("linearGradient")),
None,
@@ -857,7 +857,7 @@ mod tests {
let gradient = gradient.resolve_from_defaults();
assert!(gradient.is_resolved());
- let node = RsvgNode::new(NodeData::new(
+ let node = RsvgNode::new(NodeData::new_element(
NodeType::RadialGradient,
&QualName::new(None, ns!(svg), local_name!("radialGradient")),
None,
diff --git a/rsvg_internals/src/node.rs b/rsvg_internals/src/node.rs
index 5ee30650..8ee42567 100644
--- a/rsvg_internals/src/node.rs
+++ b/rsvg_internals/src/node.rs
@@ -60,7 +60,7 @@ pub struct NodeData {
}
impl NodeData {
- pub fn new(
+ pub fn new_element(
node_type: NodeType,
element_name: &QualName,
id: Option<&str>,
@@ -84,7 +84,7 @@ impl NodeData {
}
pub fn new_chars() -> NodeData {
- Self::new(
+ Self::new_element(
NodeType::Chars,
&QualName::new(
None,
diff --git a/rsvg_internals/src/pattern.rs b/rsvg_internals/src/pattern.rs
index c7a1346c..2eef1a8e 100644
--- a/rsvg_internals/src/pattern.rs
+++ b/rsvg_internals/src/pattern.rs
@@ -570,7 +570,7 @@ mod tests {
#[test]
fn pattern_resolved_from_defaults_is_really_resolved() {
- let node = RsvgNode::new(NodeData::new(
+ let node = RsvgNode::new(NodeData::new_element(
NodeType::Pattern,
&QualName::new(None, ns!(svg), local_name!("pattern")),
None,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]