Skip to content

Commit

Permalink
Update src/serde.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Reichold <adamreichold@users.noreply.github.com>
  • Loading branch information
cfvescovo and adamreichold committed Aug 29, 2024
1 parent e975c79 commit d082fec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ struct SerNode<'a, T> {

impl<'a, T> From<NodeRef<'a, T>> for SerNode<'a, T> {
fn from(node: NodeRef<'a, T>) -> Self {
let value: &T = node.value();
let children: Vec<SerNode<'a, T>> = node.children().map(SerNode::<'a, T>::from).collect();
SerNode { value, children }
let value = node.value();
let children = node.children().map(SerNode::from).collect();
Self { value, children }
}
}

Expand Down

0 comments on commit d082fec

Please sign in to comment.