Skip to content

Commit a2f54c7

Browse files
authored
make resolve features public for cargo-as-a-library (#15835)
### What does this PR try to resolve? While working on a [plumbing command](https://github.com/crate-ci/cargo-plumbing) for feature resolution, I hit a dead end where the fields and types are private. This PR changes the needed things into `pub`. r? @epage ### How to test and review this PR? `cargo check`
2 parents 02bcdd2 + 9e48c5a commit a2f54c7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/cargo/core/resolver/features.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,18 @@ use std::rc::Rc;
5252

5353
/// The key used in various places to store features for a particular dependency.
5454
/// The actual discrimination happens with the [`FeaturesFor`] type.
55-
type PackageFeaturesKey = (PackageId, FeaturesFor);
55+
pub type PackageFeaturesKey = (PackageId, FeaturesFor);
5656
/// Map of activated features.
57-
type ActivateMap = HashMap<PackageFeaturesKey, BTreeSet<InternedString>>;
57+
pub type ActivateMap = HashMap<PackageFeaturesKey, BTreeSet<InternedString>>;
5858

5959
/// Set of all activated features for all packages in the resolve graph.
6060
pub struct ResolvedFeatures {
61-
activated_features: ActivateMap,
61+
pub activated_features: ActivateMap,
6262
/// Optional dependencies that should be built.
6363
///
6464
/// The value is the `name_in_toml` of the dependencies.
65-
activated_dependencies: ActivateMap,
66-
opts: FeatureOpts,
65+
pub activated_dependencies: ActivateMap,
66+
pub opts: FeatureOpts,
6767
}
6868

6969
/// Options for how the feature resolver works.

0 commit comments

Comments
 (0)