Skip to content

Commit 4c272da

Browse files
committed
profiles: use HashMap for new maps instead of BTreeMap
1 parent 61beda6 commit 4c272da

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/cargo/core/profiles.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::collections::BTreeMap;
1+
use std::collections::{BTreeMap, HashMap};
22
use std::collections::HashSet;
33
use std::{cmp, env, fmt, hash};
44

@@ -18,8 +18,8 @@ pub struct Profiles {
1818
/// - `CARGO_INCREMENTAL` environment variable.
1919
/// - `build.incremental` config value.
2020
incremental: Option<bool>,
21-
dir_names: BTreeMap<String, String>,
22-
by_name: BTreeMap<String, ProfileMaker>,
21+
dir_names: HashMap<String, String>,
22+
by_name: HashMap<String, ProfileMaker>,
2323
}
2424

2525
impl Profiles {
@@ -43,7 +43,7 @@ impl Profiles {
4343
let mut profile_makers = Profiles {
4444
incremental,
4545
dir_names: Self::predefined_dir_names(),
46-
by_name: BTreeMap::new(),
46+
by_name: HashMap::new(),
4747
};
4848

4949
Self::add_root_profiles(&mut profile_makers, profiles, config_profiles);
@@ -98,8 +98,8 @@ impl Profiles {
9898
Ok(profile_makers)
9999
}
100100

101-
fn predefined_dir_names() -> BTreeMap<String, String> {
102-
let mut dir_names = BTreeMap::new();
101+
fn predefined_dir_names() -> HashMap<String, String> {
102+
let mut dir_names = HashMap::new();
103103
dir_names.insert("dev".to_owned(), "debug".to_owned());
104104
dir_names.insert("check".to_owned(), "debug".to_owned());
105105
dir_names.insert("test".to_owned(), "debug".to_owned());

0 commit comments

Comments
 (0)