1- use std:: path:: { Path , PathBuf } ;
1+ use std:: {
2+ collections:: BTreeMap ,
3+ path:: { Path , PathBuf } ,
4+ } ;
25
36use anyhow:: { format_err, Context } ;
4- use indexmap:: IndexMap ;
57use memofs:: { IoResultExt as _, Vfs } ;
68use rbx_dom_weak:: {
79 types:: { Attributes , Variant } ,
@@ -29,11 +31,11 @@ pub struct AdjacentMetadata {
2931 #[ serde( skip_serializing_if = "Option::is_none" ) ]
3032 pub ignore_unknown_instances : Option < bool > ,
3133
32- #[ serde( default , skip_serializing_if = "IndexMap ::is_empty" ) ]
33- pub properties : IndexMap < Ustr , UnresolvedValue > ,
34+ #[ serde( default , skip_serializing_if = "BTreeMap ::is_empty" ) ]
35+ pub properties : BTreeMap < Ustr , UnresolvedValue > ,
3436
35- #[ serde( default , skip_serializing_if = "IndexMap ::is_empty" ) ]
36- pub attributes : IndexMap < String , UnresolvedValue > ,
37+ #[ serde( default , skip_serializing_if = "BTreeMap ::is_empty" ) ]
38+ pub attributes : BTreeMap < String , UnresolvedValue > ,
3739
3840 #[ serde( skip) ]
3941 pub path : PathBuf ,
@@ -58,8 +60,8 @@ impl AdjacentMetadata {
5860 snapshot : & SyncbackSnapshot ,
5961 path : PathBuf ,
6062 ) -> anyhow:: Result < Option < Self > > {
61- let mut properties = IndexMap :: new ( ) ;
62- let mut attributes = IndexMap :: new ( ) ;
63+ let mut properties = BTreeMap :: new ( ) ;
64+ let mut attributes = BTreeMap :: new ( ) ;
6365 // TODO make this more granular.
6466 // I am breaking the cycle of bad TODOs. This is in reference to the fact
6567 // that right now, this will just not write any metadata at all for
@@ -213,11 +215,11 @@ pub struct DirectoryMetadata {
213215 #[ serde( skip_serializing_if = "Option::is_none" ) ]
214216 pub ignore_unknown_instances : Option < bool > ,
215217
216- #[ serde( default , skip_serializing_if = "IndexMap ::is_empty" ) ]
217- pub properties : IndexMap < Ustr , UnresolvedValue > ,
218+ #[ serde( default , skip_serializing_if = "BTreeMap ::is_empty" ) ]
219+ pub properties : BTreeMap < Ustr , UnresolvedValue > ,
218220
219- #[ serde( default , skip_serializing_if = "IndexMap ::is_empty" ) ]
220- pub attributes : IndexMap < String , UnresolvedValue > ,
221+ #[ serde( default , skip_serializing_if = "BTreeMap ::is_empty" ) ]
222+ pub attributes : BTreeMap < String , UnresolvedValue > ,
221223
222224 #[ serde( skip_serializing_if = "Option::is_none" ) ]
223225 pub class_name : Option < Ustr > ,
@@ -248,8 +250,8 @@ impl DirectoryMetadata {
248250 snapshot : & SyncbackSnapshot ,
249251 path : PathBuf ,
250252 ) -> anyhow:: Result < Option < Self > > {
251- let mut properties = IndexMap :: new ( ) ;
252- let mut attributes = IndexMap :: new ( ) ;
253+ let mut properties = BTreeMap :: new ( ) ;
254+ let mut attributes = BTreeMap :: new ( ) ;
253255 // TODO make this more granular.
254256 // I am breaking the cycle of bad TODOs. This is in reference to the fact
255257 // that right now, this will just not write any metadata at all for
0 commit comments