}
impl Context {
+ pub fn new() -> Context {
+ Context {
+ resolve_graph: RcList::new(),
+ resolve_features: HashMap::new(),
+ links: HashMap::new(),
+ resolve_replacements: RcList::new(),
+ activations: HashMap::new(),
+ warnings: RcList::new(),
+ }
+ }
+
/// Activate this summary by inserting it into our list of known activations.
///
/// Returns true if this summary with the given method is already activated.
use self::context::{Activations, Context};
use self::types::{ActivateError, ActivateResult, Candidate, ConflictReason, DepsFrame, GraphNode};
-use self::types::{RcList, RcVecIter, RegistryQueryer};
+use self::types::{RcVecIter, RegistryQueryer};
pub use self::encode::{EncodableDependency, EncodablePackageId, EncodableResolve};
pub use self::encode::{Metadata, WorkspaceResolve};
config: Option<&Config>,
print_warnings: bool,
) -> CargoResult<Resolve> {
- let cx = Context {
- resolve_graph: RcList::new(),
- resolve_features: HashMap::new(),
- links: HashMap::new(),
- resolve_replacements: RcList::new(),
- activations: HashMap::new(),
- warnings: RcList::new(),
- };
+ let cx = Context::new();
let _p = profile::start("resolving");
let minimal_versions = match config {
Some(config) => config.cli_unstable().minimal_versions,