diff --git a/crates/fj-core/src/objects/object_set.rs b/crates/fj-core/src/objects/object_set.rs index 9f727f144..ed27a6010 100644 --- a/crates/fj-core/src/objects/object_set.rs +++ b/crates/fj-core/src/objects/object_set.rs @@ -28,10 +28,11 @@ impl ObjectSet { /// # Panics /// /// Panics, if the iterator contains duplicate `Handle`s. - pub fn new(handles: impl IntoIterator) -> Self + pub fn new( + handles: impl IntoIterator>>, + ) -> Self where T: Debug + Ord, - H: Into>, { let mut added = BTreeSet::new(); let mut inner = Vec::new(); @@ -150,14 +151,13 @@ impl ObjectSet { /// /// Panics, if the update results in a duplicate item. #[must_use] - pub fn replace( + pub fn replace( &self, original: &Handle, - replacements: impl IntoIterator, + replacements: impl IntoIterator>>, ) -> Option where T: Debug + Ord, - H: Into>, { let mut iter = self.iter().cloned().peekable(); @@ -268,18 +268,6 @@ mod tests { // shouldn't do that in this case. } - #[test] - fn deduplicate_with_hashset() { - let mut core = Core::new(); - - let bare_cycle = Cycle::new([]); - let cycle = bare_cycle.insert(&mut core); - - let standard_set = HashSet::from([cycle.clone(), cycle.clone()]); - - assert_eq!(standard_set, [cycle].into()); - } - #[test] fn object_set_from_handle_wrappers() { let mut core = Core::new();