From 8ad8b4d42460b7de4043aa47000f921ff2268f59 Mon Sep 17 00:00:00 2001 From: SKTT1Ryze Date: Sat, 13 Apr 2024 18:00:51 +0800 Subject: [PATCH] fix clippy --- leetcode-rs/src/btree.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/leetcode-rs/src/btree.rs b/leetcode-rs/src/btree.rs index 8642d68..d4d0f30 100644 --- a/leetcode-rs/src/btree.rs +++ b/leetcode-rs/src/btree.rs @@ -89,11 +89,11 @@ impl TreeNodeHandle { } stack.push(node.as_ref().unwrap().clone()); - node = node.unwrap().borrow().left.clone(); + node.clone_from(&node.unwrap().borrow().left); i += 1; } } else { - node = stack.pop().unwrap().borrow().right.clone(); + node.clone_from(&stack.pop().unwrap().borrow().right); } }