diff options
Diffstat (limited to '')
| -rw-r--r-- | src/node.rs | 22 | 
1 files changed, 11 insertions, 11 deletions
| diff --git a/src/node.rs b/src/node.rs index cd6b76bb..1db10d7f 100644 --- a/src/node.rs +++ b/src/node.rs @@ -24,17 +24,6 @@ impl Node {          Self::with_children(style, Vec::new())      } -    /// Creates a new [`Node`] with the given [`Style`] and children. -    /// -    /// [`Node`]: struct.Node.html -    /// [`Style`]: struct.Style.html -    pub(crate) fn with_children(style: Style, children: Vec<Node>) -> Node { -        Node(node::Node::new( -            style.0, -            children.iter().map(|c| &c.0).collect(), -        )) -    } -      /// Creates a new [`Node`] with the given [`Style`] and a measure function.      ///      /// This type of node cannot have any children. @@ -57,4 +46,15 @@ impl Node {              Box::new(move |size| Ok(measure(size))),          ))      } + +    /// Creates a new [`Node`] with the given [`Style`] and children. +    /// +    /// [`Node`]: struct.Node.html +    /// [`Style`]: struct.Style.html +    pub fn with_children(style: Style, children: Vec<Node>) -> Node { +        Node(node::Node::new( +            style.0, +            children.iter().map(|c| &c.0).collect(), +        )) +    }  } | 
