Skip to content

Commit

Permalink
fix a typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Eh2406 committed Dec 6, 2024
1 parent a1a4ab3 commit 6421f85
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion examples/caching_dependency_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl<DP: DependencyProvider<M = String>> DependencyProvider for CachingDependenc
ranges: &DP::VS,
stats: &PackageResolutionStatistics,
) -> Self::Priority {
self.remote_dependencies.prioritize(package, ranges, statis)
self.remote_dependencies.prioritize(package, ranges, stats)
}

type Err = DP::Err;
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
//! }
//!
//! type Priority = usize;
//! fn prioritize(&self, package: &String, range: &SemVS, statis: &PackageResolutionStatistics) -> Self::Priority {
//! fn prioritize(&self, package: &String, range: &SemVS, stats: &PackageResolutionStatistics) -> Self::Priority {
//! unimplemented!()
//! }
//!
Expand Down
4 changes: 2 additions & 2 deletions src/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ impl<P: Package, VS: VersionSet> DependencyProvider for OfflineDependencyProvide
&self,
package: &P,
range: &VS,
statis: &PackageResolutionStatistics,
stats: &PackageResolutionStatistics,
) -> Self::Priority {
let version_count = self
.dependencies
Expand All @@ -112,7 +112,7 @@ impl<P: Package, VS: VersionSet> DependencyProvider for OfflineDependencyProvide
if version_count == 0 {
return (u32::MAX, Reverse(0));
}
(statis.conflict_count(), Reverse(version_count as u32))
(stats.conflict_count(), Reverse(version_count as u32))
}

#[inline]
Expand Down
6 changes: 3 additions & 3 deletions src/solver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ pub fn resolve<DP: DependencyProvider>(

let Some(highest_priority_pkg) =
state.partial_solution.pick_highest_priority_pkg(|p, r| {
let statis = PackageResolutionStatistics::new(p, &state.conflict_count);
dependency_provider.prioritize(&state.package_store[p], r, &statis)
let stats = PackageResolutionStatistics::new(p, &state.conflict_count);
dependency_provider.prioritize(&state.package_store[p], r, &stats)
})
else {
return Ok(state
Expand Down Expand Up @@ -299,7 +299,7 @@ pub trait DependencyProvider {
&self,
package: &Self::P,
range: &Self::VS,
statis: &PackageResolutionStatistics,
stats: &PackageResolutionStatistics,
) -> Self::Priority;
/// The type returned from `prioritize`. The resolver does not care what type this is
/// as long as it can pick a largest one and clone it.
Expand Down
8 changes: 4 additions & 4 deletions tests/proptest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ impl<P: Package, VS: VersionSet> DependencyProvider for OldestVersionsDependency
&self,
package: &P,
range: &VS,
statis: &PackageResolutionStatistics,
stats: &PackageResolutionStatistics,
) -> Self::Priority {
self.0.prioritize(package, range, statis)
self.0.prioritize(package, range, stats)
}

type Err = Infallible;
Expand Down Expand Up @@ -113,9 +113,9 @@ impl<DP: DependencyProvider> DependencyProvider for TimeoutDependencyProvider<DP
&self,
package: &DP::P,
range: &DP::VS,
statis: &PackageResolutionStatistics,
stats: &PackageResolutionStatistics,
) -> Self::Priority {
self.dp.prioritize(package, range, statis)
self.dp.prioritize(package, range, stats)
}

type Err = DP::Err;
Expand Down

0 comments on commit 6421f85

Please sign in to comment.