Skip to content

Commit 1c1a758

Browse files
committed
index: Reuse FeaturesMap alias in Crate struct
1 parent 69039a9 commit 1c1a758

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/crates_io_index/data.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1+
use crate::features::FeaturesMap;
12
use std::cmp::Ordering;
2-
use std::collections::BTreeMap;
33

44
#[derive(Serialize, Deserialize, Debug)]
55
pub struct Crate {
66
pub name: String,
77
pub vers: String,
88
pub deps: Vec<Dependency>,
99
pub cksum: String,
10-
pub features: BTreeMap<String, Vec<String>>,
10+
pub features: FeaturesMap,
1111
/// This field contains features with new, extended syntax. Specifically,
1212
/// namespaced features (`dep:`) and weak dependencies (`pkg?/feat`).
1313
///
@@ -18,7 +18,7 @@ pub struct Crate {
1818
/// will fail to load due to not being able to parse the new syntax, even
1919
/// with a `Cargo.lock` file.
2020
#[serde(skip_serializing_if = "Option::is_none")]
21-
pub features2: Option<BTreeMap<String, Vec<String>>>,
21+
pub features2: Option<FeaturesMap>,
2222
pub yanked: Option<bool>,
2323
#[serde(skip_serializing_if = "Option::is_none")]
2424
pub links: Option<String>,

0 commit comments

Comments
 (0)