From f37aeac3ca6de3086d23c62020e13dddeca96e31 Mon Sep 17 00:00:00 2001 From: Martin Huschenbett Date: Wed, 13 Dec 2023 18:34:18 +0100 Subject: [PATCH] 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. --- src/smart-pointers/exercise.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/smart-pointers/exercise.rs b/src/smart-pointers/exercise.rs index bcd49878..c4134c2f 100644 --- a/src/smart-pointers/exercise.rs +++ b/src/smart-pointers/exercise.rs @@ -42,7 +42,7 @@ impl BinaryTree { right: BinaryTree::new(), })); } - Some(ref mut n) => { + Some(n) => { if value < n.value { n.left.insert(value); } else if value > n.value {