forked from mirrors/jj
cleanup: access integer types' MAX constants directly on the type
Using `std::u32::MAX` is deprecated.
This commit is contained in:
parent
02e6420606
commit
f755c3f740
2 changed files with 2 additions and 2 deletions
|
@ -906,7 +906,7 @@ impl<'a> CompositeIndex<'a> {
|
||||||
// ancestors are not heads.
|
// ancestors are not heads.
|
||||||
// Also find the smallest generation number among the candidates.
|
// Also find the smallest generation number among the candidates.
|
||||||
let mut work = BinaryHeap::new();
|
let mut work = BinaryHeap::new();
|
||||||
let mut min_generation = std::u32::MAX;
|
let mut min_generation = u32::MAX;
|
||||||
for pos in &candidate_positions {
|
for pos in &candidate_positions {
|
||||||
let entry = self.entry_by_pos(*pos);
|
let entry = self.entry_by_pos(*pos);
|
||||||
min_generation = min(min_generation, entry.generation_number());
|
min_generation = min(min_generation, entry.generation_number());
|
||||||
|
|
|
@ -123,7 +123,7 @@ fn heads_of_set(
|
||||||
) -> HashSet<CommitId> {
|
) -> HashSet<CommitId> {
|
||||||
let mut visited = HashSet::new();
|
let mut visited = HashSet::new();
|
||||||
let mut work = vec![];
|
let mut work = vec![];
|
||||||
let mut oldest = std::u64::MAX;
|
let mut oldest = u64::MAX;
|
||||||
let mut heads: HashSet<CommitId> = commit_ids.collect();
|
let mut heads: HashSet<CommitId> = commit_ids.collect();
|
||||||
for commit_id in &heads {
|
for commit_id in &heads {
|
||||||
let commit = store.get_commit(commit_id).unwrap();
|
let commit = store.get_commit(commit_id).unwrap();
|
||||||
|
|
Loading…
Reference in a new issue