From 36f6ecce1987df636b43d5cfbc5aab7d0eae89c2 Mon Sep 17 00:00:00 2001 From: ripytide Date: Sun, 27 Nov 2022 00:56:07 +0000 Subject: [PATCH] fixed tests should've been next_back() lol --- range_bounds_set/src/bounds.rs | 2 +- range_bounds_set/src/range_bounds_map.rs | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/range_bounds_set/src/bounds.rs b/range_bounds_set/src/bounds.rs index a1d56a6..059dd8e 100644 --- a/range_bounds_set/src/bounds.rs +++ b/range_bounds_set/src/bounds.rs @@ -17,7 +17,7 @@ impl StartBound { //when using this as an end value in a range search pub(crate) fn as_end_bound(self) -> StartBound { match self { - //flipping is unnecessary + //flipping is unnecessary StartBound::Included(point) => StartBound::Included(point), //flip to Reverses StartBound::Excluded(point) => StartBound::ReverseExcluded(point), diff --git a/range_bounds_set/src/range_bounds_map.rs b/range_bounds_set/src/range_bounds_map.rs index 07486b5..587929a 100644 --- a/range_bounds_set/src/range_bounds_map.rs +++ b/range_bounds_set/src/range_bounds_map.rs @@ -82,11 +82,10 @@ where //optimisation fix this without cloning StartBound::from( search_range_bounds.start_bound().cloned(), - ) - .as_end_bound(), + ), ), )) - .next() + .next_back() { if possible_missing_range_bounds.overlaps(&search_range_bounds) { return Either::Left(