@@ -182,7 +182,7 @@ fn activate(mut cx: Box<Context>,
182
182
183
183
// Next, transform all dependencies into a list of possible candidates which
184
184
// can satisfy that dependency.
185
- let mut deps = try!( deps. into_iter ( ) . map ( |( _dep_name , ( dep, features) ) | {
185
+ let mut deps = try!( deps. into_iter ( ) . map ( |( dep, features) | {
186
186
let mut candidates = try!( registry. query ( dep) ) ;
187
187
// When we attempt versions for a package, we'll want to start at the
188
188
// maximum version and work our way down.
@@ -430,8 +430,7 @@ fn compatible(a: &semver::Version, b: &semver::Version) -> bool {
430
430
431
431
fn resolve_features < ' a > ( cx : & mut Context , parent : & ' a Summary ,
432
432
method : Method )
433
- -> CargoResult < HashMap < & ' a str ,
434
- ( & ' a Dependency , Vec < String > ) > > {
433
+ -> CargoResult < Vec < ( & ' a Dependency , Vec < String > ) > > {
435
434
let dev_deps = match method {
436
435
Method :: Everything => true ,
437
436
Method :: Required { dev_deps, .. } => dev_deps,
@@ -452,7 +451,7 @@ fn resolve_features<'a>(cx: &mut Context, parent: &'a Summary,
452
451
} ) ;
453
452
454
453
let ( mut feature_deps, used_features) = try!( build_features ( parent, method) ) ;
455
- let mut ret = HashMap :: new ( ) ;
454
+ let mut ret = Vec :: new ( ) ;
456
455
457
456
// Next, sanitize all requested features by whitelisting all the requested
458
457
// features that correspond to optional dependencies
@@ -461,7 +460,7 @@ fn resolve_features<'a>(cx: &mut Context, parent: &'a Summary,
461
460
if dep. is_optional ( ) && !feature_deps. contains_key ( dep. name ( ) ) {
462
461
continue
463
462
}
464
- let mut base = feature_deps. remove ( dep. name ( ) ) . unwrap_or ( vec ! [ ] ) ;
463
+ let mut base = feature_deps. remove ( dep. name ( ) ) . unwrap_or ( Vec :: new ( ) ) ;
465
464
for feature in dep. features ( ) . iter ( ) {
466
465
base. push ( feature. clone ( ) ) ;
467
466
if feature. contains ( "/" ) {
@@ -471,7 +470,7 @@ fn resolve_features<'a>(cx: &mut Context, parent: &'a Summary,
471
470
feature) ) ) ;
472
471
}
473
472
}
474
- ret. insert ( dep . name ( ) , ( dep, base) ) ;
473
+ ret. push ( ( dep, base) ) ;
475
474
}
476
475
477
476
// All features can only point to optional dependencies, in which case they
0 commit comments