Skip to content

Commit

Permalink
Auto merge of #7990 - ehuss:workspace-resolve-lifetime, r=alexcrichton
Browse files Browse the repository at this point in the history
WorkspaceResolve: Use descriptive lifetime label.

I find it helpful to have descriptive lifetime names.
  • Loading branch information
bors committed Mar 12, 2020
2 parents 94c7bc7 + 442e2fd commit fb3dad9
Showing 1 changed file with 8 additions and 8 deletions.
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

0 comments on commit fb3dad9

Please sign in to comment.