From 6d79a143a71d6f71b30588a3afb58da5e0937cbe Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Tue, 28 Oct 2014 21:42:49 -0400 Subject: [PATCH] Simplify dereferencing --- src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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, } } -- 2.51.2