diff options
author | Raito Bezarius | 2024-04-18 14:43:41 +0200 |
---|---|---|
committer | Raito Bezarius | 2024-04-18 14:43:41 +0200 |
commit | 8ed11ddcc8ccee48300ffee8cf68408a711a51ca (patch) | |
tree | b148c799c942c2fce614c8b17634f0e87f0a592f | |
parent | 5289b86a5c14ec99311424022a867872173edce4 (diff) |
feat: make `find` extractable
I was not borrowing `&self`!
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
-rw-r--r-- | src/main.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 59642d0..1fa0f35 100644 --- a/src/main.rs +++ b/src/main.rs @@ -27,7 +27,7 @@ impl<T: Ord> AVLTreeSet<T> { Self { root: None } } - pub fn find(self, value: T) -> bool { + pub fn find(&self, value: T) -> bool { let mut current_tree = &self.root; while let Some(current_node) = current_tree { |