aboutsummaryrefslogtreecommitdiff
path: root/common/object
diff options
context:
space:
mode:
Diffstat (limited to 'common/object')
-rw-r--r--common/object/src/lib.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/common/object/src/lib.rs b/common/object/src/lib.rs
index 290cf91..5637dd6 100644
--- a/common/object/src/lib.rs
+++ b/common/object/src/lib.rs
@@ -17,7 +17,11 @@ pub use path::*;
pub use registry::*;
pub use value::*;
-use std::{collections::HashSet, hash::Hash, marker::PhantomData};
+use std::{
+ collections::{BTreeSet, HashSet},
+ hash::Hash,
+ marker::PhantomData,
+};
#[repr(transparent)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
@@ -150,7 +154,7 @@ impl<'a> Object<'a> {
}
}
#[must_use]
- pub fn extend<T: Value<'a> + Hash + Eq + PartialEq>(
+ pub fn extend<T: Value<'a> + Eq + Ord>(
&self,
tag: TypedTag<T>,
values: impl IntoIterator<Item = T>,
@@ -160,7 +164,7 @@ impl<'a> Object<'a> {
&self
.iter(tag)
.chain(values)
- .collect::<HashSet<_>>()
+ .collect::<BTreeSet<_>>()
.into_iter()
.collect::<Vec<_>>(),
)