Skip to content

Commit

Permalink
one more comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Eh2406 committed Mar 30, 2019
1 parent a979c9b commit 1dd8e56
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/cargo/core/resolver/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,12 @@ pub struct Context {
/// When backtracking it can be useful to know how far back to go.
/// The `ContextAge` of a `Context` is a monotonically increasing counter of the number
/// of decisions made to get to this state.
/// Several structures store the `ContextAge` when it was added, this lets use jump back.
/// Several structures store the `ContextAge` when it was added, that gets use in jump back.
pub type ContextAge = usize;

/// find the activated version of a crate based on the name, source, and semver compatibility
/// Find the activated version of a crate based on the name, source, and semver compatibility.
/// By storing this in a hash map we ensure that there is only one
/// semver compatible version of each crate.
/// This all so stores the `ContextAge`.
pub type Activations =
im_rc::HashMap<(InternedString, SourceId, SemverCompatibility), (Summary, ContextAge)>;
Expand Down Expand Up @@ -208,7 +210,7 @@ impl Context {

/// Checks whether all of `parent` and the keys of `conflicting activations`
/// are still active.
/// If so returns the "age" (len of activations) when the newest one was added.
/// If so returns the `ContextAge` when the newest one was added.
pub fn is_conflicting(
&self,
parent: Option<PackageId>,
Expand Down
2 changes: 1 addition & 1 deletion src/cargo/core/resolver/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ fn generalize_conflicting(
if conflicting_activations.is_empty() {
return None;
}
// We need to determine the "age" that this `conflicting_activations` will jump to, and why.
// We need to determine the `ContextAge` that this `conflicting_activations` will jump to, and why.
let (jumpback_critical_age, jumpback_critical_id) = conflicting_activations
.keys()
.map(|&c| (cx.is_active(c).expect("not currently active!?"), c))
Expand Down

0 comments on commit 1dd8e56

Please sign in to comment.