2
2
//! and manages the serialising and deserialising of this information
3
3
//! to and from structs. The serlializing is only utilised in
4
4
//! integration tests.
5
- use std:: collections:: HashMap ;
5
+ use std:: collections:: { BTreeMap , HashMap } ;
6
6
7
7
use serde:: { de, Deserialize , Deserializer , Serialize , Serializer } ;
8
8
@@ -17,7 +17,7 @@ pub struct EncodableCrateUpload {
17
17
pub name : EncodableCrateName ,
18
18
pub vers : EncodableCrateVersion ,
19
19
pub deps : Vec < EncodableCrateDependency > ,
20
- pub features : HashMap < EncodableFeatureName , Vec < EncodableFeature > > ,
20
+ pub features : BTreeMap < EncodableFeatureName , Vec < EncodableFeature > > ,
21
21
pub description : Option < String > ,
22
22
pub homepage : Option < String > ,
23
23
pub documentation : Option < String > ,
@@ -53,7 +53,7 @@ pub struct EncodableCategoryList(pub Vec<EncodableCategory>);
53
53
pub struct EncodableCategory ( pub String ) ;
54
54
#[ derive( Serialize , Debug , Deref ) ]
55
55
pub struct EncodableFeature ( pub String ) ;
56
- #[ derive( PartialEq , Eq , Hash , Serialize , Debug , Deref ) ]
56
+ #[ derive( PartialEq , Eq , PartialOrd , Ord , Hash , Serialize , Debug , Deref ) ]
57
57
pub struct EncodableFeatureName ( pub String ) ;
58
58
59
59
#[ derive( Serialize , Deserialize , Debug ) ]
0 commit comments