ok/jj
1
0
Fork 0
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:
Martin von Zweigbergk 2021-03-08 23:07:19 -08:00
parent 02e6420606
commit f755c3f740
2 changed files with 2 additions and 2 deletions

View file

@ -906,7 +906,7 @@ impl<'a> CompositeIndex<'a> {
// ancestors are not heads.
// Also find the smallest generation number among the candidates.
let mut work = BinaryHeap::new();
let mut min_generation = std::u32::MAX;
let mut min_generation = u32::MAX;
for pos in &candidate_positions {
let entry = self.entry_by_pos(*pos);
min_generation = min(min_generation, entry.generation_number());

View file

@ -123,7 +123,7 @@ fn heads_of_set(
) -> HashSet<CommitId> {
let mut visited = HashSet::new();
let mut work = vec![];
let mut oldest = std::u64::MAX;
let mut oldest = u64::MAX;
let mut heads: HashSet<CommitId> = commit_ids.collect();
for commit_id in &heads {
let commit = store.get_commit(commit_id).unwrap();