Skip to content

Commit

Permalink
remove unused return value in into_tree_node
Browse files Browse the repository at this point in the history
  • Loading branch information
LoZack19 committed Aug 29, 2024
1 parent 644828b commit 2520ba0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use serde::{
Deserialize, Deserializer,
};

use crate::{NodeId, NodeMut, NodeRef, Tree};
use crate::{NodeMut, NodeRef, Tree};

#[derive(Debug)]
struct SerNode<'a, T> {
Expand Down Expand Up @@ -56,14 +56,12 @@ struct DeserNode<T> {
}

impl<T> DeserNode<T> {
fn into_tree_node(self, parent: &mut NodeMut<T>) -> NodeId {
fn into_tree_node(self, parent: &mut NodeMut<T>) {
let mut node = parent.append(self.value);

for child in self.children {
child.into_tree_node(&mut node);
}

node.id
}
}

Expand Down

0 comments on commit 2520ba0

Please sign in to comment.