aboutsummaryrefslogtreecommitdiff
path: root/common/object
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2026-01-16 17:14:48 +0100
committermetamuffin <metamuffin@disroot.org>2026-01-16 17:14:48 +0100
commitce2b34851d38dc28d6ffbbb4fe563e226acb7445 (patch)
tree04ea331b4549df0d1a0b62e854d65f14137f528c /common/object
parent30e13399fa9f815cd1884fe87914cdb22d1985af (diff)
downloadjellything-ce2b34851d38dc28d6ffbbb4fe563e226acb7445.tar
jellything-ce2b34851d38dc28d6ffbbb4fe563e226acb7445.tar.bz2
jellything-ce2b34851d38dc28d6ffbbb4fe563e226acb7445.tar.zst
finish refactoring import crate
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<_>>(),
)