@@ -5,7 +5,7 @@ extern crate serde;
5
5
pub mod testing;
6
6
7
7
use anyhow:: { anyhow, Context } ;
8
- use std:: collections:: HashMap ;
8
+ use std:: collections:: BTreeMap ;
9
9
use std:: io:: Write ;
10
10
use std:: path:: { Path , PathBuf } ;
11
11
use std:: process:: Command ;
@@ -101,7 +101,7 @@ pub struct Crate {
101
101
pub vers : String ,
102
102
pub deps : Vec < Dependency > ,
103
103
pub cksum : String ,
104
- pub features : HashMap < String , Vec < String > > ,
104
+ pub features : BTreeMap < String , Vec < String > > ,
105
105
/// This field contains features with new, extended syntax. Specifically,
106
106
/// namespaced features (`dep:`) and weak dependencies (`pkg?/feat`).
107
107
///
@@ -112,7 +112,7 @@ pub struct Crate {
112
112
/// will fail to load due to not being able to parse the new syntax, even
113
113
/// with a `Cargo.lock` file.
114
114
#[ serde( skip_serializing_if = "Option::is_none" ) ]
115
- pub features2 : Option < HashMap < String , Vec < String > > > ,
115
+ pub features2 : Option < BTreeMap < String , Vec < String > > > ,
116
116
pub yanked : Option < bool > ,
117
117
#[ serde( default ) ]
118
118
pub links : Option < String > ,
@@ -139,7 +139,7 @@ pub struct Crate {
139
139
pub v : Option < u32 > ,
140
140
}
141
141
142
- #[ derive( Serialize , Deserialize , Debug ) ]
142
+ #[ derive( Serialize , Deserialize , Debug , PartialEq , PartialOrd , Ord , Eq ) ]
143
143
pub struct Dependency {
144
144
pub name : String ,
145
145
pub req : String ,
@@ -152,7 +152,7 @@ pub struct Dependency {
152
152
pub package : Option < String > ,
153
153
}
154
154
155
- #[ derive( Copy , Clone , Serialize , Deserialize , Debug ) ]
155
+ #[ derive( Copy , Clone , Serialize , Deserialize , Debug , PartialEq , PartialOrd , Ord , Eq ) ]
156
156
#[ serde( rename_all = "lowercase" ) ]
157
157
pub enum DependencyKind {
158
158
Normal ,
0 commit comments