Skip to content

Commit 1013362

Browse files
committed
index: Reuse FeaturesMap alias in Crate struct
1 parent 693f3fc commit 1013362

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

crates/crates_io_index/data.rs

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

@@ -7,7 +8,7 @@ pub struct Crate {
78
pub vers: String,
89
pub deps: Vec<Dependency>,
910
pub cksum: String,
10-
pub features: BTreeMap<String, Vec<String>>,
11+
pub features: FeaturesMap,
1112
/// This field contains features with new, extended syntax. Specifically,
1213
/// namespaced features (`dep:`) and weak dependencies (`pkg?/feat`).
1314
///
@@ -18,7 +19,7 @@ pub struct Crate {
1819
/// will fail to load due to not being able to parse the new syntax, even
1920
/// with a `Cargo.lock` file.
2021
#[serde(skip_serializing_if = "Option::is_none")]
21-
pub features2: Option<BTreeMap<String, Vec<String>>>,
22+
pub features2: Option<FeaturesMap>,
2223
pub yanked: Option<bool>,
2324
#[serde(skip_serializing_if = "Option::is_none")]
2425
pub links: Option<String>,

0 commit comments

Comments
 (0)