on master help sign in
Make raw `Node` constructors internal

The builders are better for everyone else.

commit3d69bdd1e7cfe7be95e0e304b5cb92b9b17789e2 authorNick Fitzgerald <fitzgen@gmail.com> dateWed 13 Feb 2019, 15:10 (8 years ago) parent682b8b4
1 file changed+2−2
src/node.rs+2−2
src/node.rs+2−2
@@ -87,7 +87,7 @@ impl<'a> Attribute<'a> {
8787impl<'a> Node<'a> {
8888 /// Construct a new element node with the given tag name and children.
8989 #[inline]
90− pub fn element<Listeners, Attributes, Children>(
90+ pub(crate) fn element<Listeners, Attributes, Children>(
9191 bump: &'a Bump,
9292 tag_name: &'a str,
9393 listeners: Listeners,
@@ -134,7 +134,7 @@ impl<'a> Node<'a> {
134134
135135 /// Construct a new text node with the given text.
136136 #[inline]
137− pub fn text(text: &'a str) -> Node<'a> {
137+ pub(crate) fn text(text: &'a str) -> Node<'a> {
138138 Node::Text(TextNode { text })
139139 }
140140}