Skip to content

Commit 1dd8e56

Browse files
committed
one more comment
1 parent a979c9b commit 1dd8e56

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/cargo/core/resolver/context.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,12 @@ pub struct Context {
5656
/// When backtracking it can be useful to know how far back to go.
5757
/// The `ContextAge` of a `Context` is a monotonically increasing counter of the number
5858
/// of decisions made to get to this state.
59-
/// Several structures store the `ContextAge` when it was added, this lets use jump back.
59+
/// Several structures store the `ContextAge` when it was added, that gets use in jump back.
6060
pub type ContextAge = usize;
6161

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

209211
/// Checks whether all of `parent` and the keys of `conflicting activations`
210212
/// are still active.
211-
/// If so returns the "age" (len of activations) when the newest one was added.
213+
/// If so returns the `ContextAge` when the newest one was added.
212214
pub fn is_conflicting(
213215
&self,
214216
parent: Option<PackageId>,

src/cargo/core/resolver/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ fn generalize_conflicting(
870870
if conflicting_activations.is_empty() {
871871
return None;
872872
}
873-
// We need to determine the "age" that this `conflicting_activations` will jump to, and why.
873+
// We need to determine the `ContextAge` that this `conflicting_activations` will jump to, and why.
874874
let (jumpback_critical_age, jumpback_critical_id) = conflicting_activations
875875
.keys()
876876
.map(|&c| (cx.is_active(c).expect("not currently active!?"), c))

0 commit comments

Comments
 (0)