From 8ed11ddcc8ccee48300ffee8cf68408a711a51ca Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Thu, 18 Apr 2024 14:43:41 +0200 Subject: feat: make `find` extractable I was not borrowing `&self`! Signed-off-by: Raito Bezarius --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 AVLTreeSet { 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 { -- cgit v1.2.3