22
33use rand:: seq:: IteratorRandom ;
44use serde_json:: Value ;
5- use std:: collections:: HashMap ;
5+ use std:: collections:: BTreeMap ;
66
77// Max length when generating "sequences" of things, such as strings, arrays,
88// and objects.
@@ -100,8 +100,8 @@ fn fuzz_with_root<R: rand::Rng>(root: &jtd::Schema, rng: &mut R, schema: &jtd::S
100100 // why it's important these come after the "primitive" cases.
101101 5 => {
102102 let schema = jtd:: Schema {
103- metadata : HashMap :: new ( ) ,
104- definitions : HashMap :: new ( ) ,
103+ metadata : BTreeMap :: new ( ) ,
104+ definitions : BTreeMap :: new ( ) ,
105105 form : jtd:: Form :: Elements ( jtd:: form:: Elements {
106106 nullable : false ,
107107 schema : Default :: default ( ) ,
@@ -113,8 +113,8 @@ fn fuzz_with_root<R: rand::Rng>(root: &jtd::Schema, rng: &mut R, schema: &jtd::S
113113
114114 6 => {
115115 let schema = jtd:: Schema {
116- metadata : HashMap :: new ( ) ,
117- definitions : HashMap :: new ( ) ,
116+ metadata : BTreeMap :: new ( ) ,
117+ definitions : BTreeMap :: new ( ) ,
118118 form : jtd:: Form :: Values ( jtd:: form:: Values {
119119 nullable : false ,
120120 schema : Default :: default ( ) ,
@@ -216,7 +216,7 @@ fn fuzz_with_root<R: rand::Rng>(root: &jtd::Schema, rng: &mut R, schema: &jtd::S
216216 return Value :: Null ;
217217 }
218218
219- let mut members = HashMap :: new ( ) ;
219+ let mut members = BTreeMap :: new ( ) ;
220220
221221 let mut required_keys: Vec < _ > = required. keys ( ) . cloned ( ) . collect ( ) ;
222222 required_keys. sort ( ) ;
0 commit comments