Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WorkspaceResolve: Use descriptive lifetime label. #7990

Merged
merged 1 commit into from
Mar 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/cargo/ops/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ use log::{debug, trace};
use std::collections::HashSet;

/// Result for `resolve_ws_with_opts`.
pub struct WorkspaceResolve<'a> {
pub struct WorkspaceResolve<'cfg> {
/// Packages to be downloaded.
pub pkg_set: PackageSet<'a>,
pub pkg_set: PackageSet<'cfg>,
/// The resolve for the entire workspace.
///
/// This may be `None` for things like `cargo install` and `-Zavoid-dev-deps`.
Expand Down Expand Up @@ -72,14 +72,14 @@ pub fn resolve_ws<'a>(ws: &Workspace<'a>) -> CargoResult<(PackageSet<'a>, Resolv
///
/// `specs` may be empty, which indicates it should resolve all workspace
/// members. In this case, `opts.all_features` must be `true`.
pub fn resolve_ws_with_opts<'a>(
ws: &Workspace<'a>,
pub fn resolve_ws_with_opts<'cfg>(
ws: &Workspace<'cfg>,
target_data: &RustcTargetData,
requested_target: CompileKind,
opts: &ResolveOpts,
specs: &[PackageIdSpec],
has_dev_units: HasDevUnits,
) -> CargoResult<WorkspaceResolve<'a>> {
) -> CargoResult<WorkspaceResolve<'cfg>> {
let mut registry = PackageRegistry::new(ws.config())?;
let mut add_patches = true;
let resolve = if ws.ignore_lock() {
Expand Down Expand Up @@ -371,10 +371,10 @@ pub fn add_overrides<'a>(
Ok(())
}

pub fn get_resolved_packages<'a>(
pub fn get_resolved_packages<'cfg>(
resolve: &Resolve,
registry: PackageRegistry<'a>,
) -> CargoResult<PackageSet<'a>> {
registry: PackageRegistry<'cfg>,
) -> CargoResult<PackageSet<'cfg>> {
let ids: Vec<PackageId> = resolve.iter().collect();
registry.get(&ids)
}
Expand Down