Ensure sorting when deserializing
This commit is contained in:
parent
21ba413df4
commit
0695740666
@ -23,8 +23,10 @@ pub enum DeserializeDatabase {
|
|||||||
impl From<DeserializeDatabase> for Collection {
|
impl From<DeserializeDatabase> for Collection {
|
||||||
fn from(database: DeserializeDatabase) -> Self {
|
fn from(database: DeserializeDatabase) -> Self {
|
||||||
match database {
|
match database {
|
||||||
DeserializeDatabase::V20250103(collection) => {
|
DeserializeDatabase::V20250103(db) => {
|
||||||
collection.into_iter().map(Into::into).collect()
|
let mut collection: Collection = db.into_iter().map(Into::into).collect();
|
||||||
|
collection.sort_unstable();
|
||||||
|
collection
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user