on master help sign in
Make raw `Node` constructors internal
3d69bddNick Fitzgerald
src/node.rs+2−2
@@ -87,7 +87,7 @@ impl<'a> Attribute<'a> {
87impl<'a> Node<'a> {
87impl<'a> Node<'a> {
88 /// Construct a new element node with the given tag name and children.
88 /// Construct a new element node with the given tag name and children.
89 #[inline]
89 #[inline]
90− pub fn element<Listeners, Attributes, Children>(
90+ pub(crate) fn element<Listeners, Attributes, Children>(
91 bump: &'a Bump,
91 bump: &'a Bump,
92 tag_name: &'a str,
92 tag_name: &'a str,
93 listeners: Listeners,
93 listeners: Listeners,
@@ -134,7 +134,7 @@ impl<'a> Node<'a> {
134
134
135 /// Construct a new text node with the given text.
135 /// Construct a new text node with the given text.
136 #[inline]
136 #[inline]
137− pub fn text(text: &'a str) -> Node<'a> {
137+ pub(crate) fn text(text: &'a str) -> Node<'a> {
138 Node::Text(TextNode { text })
138 Node::Text(TextNode { text })
139 }
139 }
140}
140}