mirror of
https://github.com/google/comprehensive-rust.git
synced 2024-12-16 14:53:28 +02:00
Remove unnecessary ref mut in binary tree exercise (#1586)
There's no need for the `ref mut` in the pattern. So, let's just drop it for the sake of simplicity.
This commit is contained in:
parent
ce081b12f9
commit
f37aeac3ca
@ -42,7 +42,7 @@ impl<T: Ord + Copy> BinaryTree<T> {
|
|||||||
right: BinaryTree::new(),
|
right: BinaryTree::new(),
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
Some(ref mut n) => {
|
Some(n) => {
|
||||||
if value < n.value {
|
if value < n.value {
|
||||||
n.left.insert(value);
|
n.left.insert(value);
|
||||||
} else if value > n.value {
|
} else if value > n.value {
|
||||||
|
Loading…
Reference in New Issue
Block a user