From f5181ba8d518480c3f27bd835be64191380e54e1 Mon Sep 17 00:00:00 2001 From: RobWalt Date: Wed, 2 Aug 2023 08:47:33 +0200 Subject: [PATCH] chore: remove unused impl of private trait ActiveSet --- geo/src/algorithm/sweep/active.rs | 46 +------------------------------ 1 file changed, 1 insertion(+), 45 deletions(-) diff --git a/geo/src/algorithm/sweep/active.rs b/geo/src/algorithm/sweep/active.rs index afd57525a..be87b7b57 100644 --- a/geo/src/algorithm/sweep/active.rs +++ b/geo/src/algorithm/sweep/active.rs @@ -1,10 +1,4 @@ -use std::{ - borrow::Borrow, - cmp::Ordering, - collections::BTreeSet, - fmt::Debug, - ops::{Bound, Deref}, -}; +use std::{borrow::Borrow, cmp::Ordering, fmt::Debug, ops::Deref}; /// A segment currently active in the sweep. /// @@ -86,41 +80,3 @@ pub(super) trait ActiveSet: Default { fn insert_active(&mut self, segment: Self::Seg); fn remove_active(&mut self, segment: &Self::Seg); } - -impl ActiveSet for BTreeSet> { - type Seg = T; - - fn previous_find) -> bool>( - &self, - segment: &Self::Seg, - mut f: F, - ) -> Option<&Active> { - self.range::, _>(( - Bound::Unbounded, - Bound::Excluded(Active::active_ref(segment)), - )) - .rev() - .find(|&a| f(a)) - } - fn next_find) -> bool>( - &self, - segment: &Self::Seg, - mut f: F, - ) -> Option<&Active> { - self.range::, _>(( - Bound::Excluded(Active::active_ref(segment)), - Bound::Unbounded, - )) - .find(|&a| f(a)) - } - - fn insert_active(&mut self, segment: Self::Seg) { - let result = self.insert(Active(segment)); - debug_assert!(result); - } - - fn remove_active(&mut self, segment: &Self::Seg) { - let result = self.remove(Active::active_ref(segment)); - debug_assert!(result); - } -}