diff --git a/geo/src/algorithm/sweep/active.rs b/geo/src/algorithm/sweep/active.rs index 44987e917..94f15c630 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}; use crate::types::GeoError; @@ -88,43 +82,3 @@ pub(super) trait ActiveSet: Default { fn insert_active(&mut self, segment: Self::Seg) -> Result<(), GeoError>; fn remove_active(&mut self, segment: &Self::Seg) -> Result<(), GeoError>; } - -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) -> Result<(), GeoError> { - let result = self.insert(Active(segment)); - debug_assert!(result); - Ok(()) - } - - fn remove_active(&mut self, segment: &Self::Seg) -> Result<(), GeoError> { - let result = self.remove(Active::active_ref(segment)); - debug_assert!(result); - Ok(()) - } -}