Skip to content

Commit

Permalink
Node::children() return slice and fix typo
Browse files Browse the repository at this point in the history
Cargo fmt
  • Loading branch information
LDeakin committed Feb 21, 2024
1 parent 5296fca commit ec9779f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ impl Node {
}

/// Returns a reference to the path of the node.
#[must_use]
#[must_use]
pub fn path(&self) -> &NodePath {
&self.path
}
Expand All @@ -153,9 +153,9 @@ impl Node {
&self.metadata
}

/// Returns a reference to the metadata of the node.
/// Returns a reference to the children of the node.
#[must_use]
pub fn children(&self) -> &Vec<Node> {
pub fn children(&self) -> &[Node] {
&self.children
}

Expand Down

0 comments on commit ec9779f

Please sign in to comment.