diff --git a/src/lib.rs b/src/lib.rs index 33d9fa6..0606489 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -92,12 +92,12 @@ impl Node { fn next_direction(&self, to_insert: &V) -> Direction { match *self { TwoNode(ref value, _, _) => - if *to_insert < *value { Left } - else { Middle }, + if to_insert < value { Left } + else { Middle }, ThreeNode(ref value1, ref value2, _, _, _) => - if *to_insert < *value1 { Left } - else if *to_insert > *value2 { Right } - else { Middle }, + if to_insert < value1 { Left } + else if to_insert > value2 { Right } + else { Middle }, _ => Leaf, } }