Skip to content

Commit

Permalink
style: use usize::MAX instead of deprecated std::usize::MAX (#1112)
Browse files Browse the repository at this point in the history
  • Loading branch information
samueltardieu authored Sep 17, 2024
1 parent f43652b commit 2b721ce
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ pub fn operands_and_operators<'a, T: ParserTrait>(parser: &'a T, path: &'a Path)
}
}

finalize::<T>(&mut state_stack, std::usize::MAX);
finalize::<T>(&mut state_stack, usize::MAX);

state_stack.pop().map(|mut state| {
state.ops.name = path.to_str().map(|name| name.to_string());
Expand Down
2 changes: 1 addition & 1 deletion src/spaces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ pub fn metrics<'a, T: ParserTrait>(parser: &'a T, path: &'a Path) -> Option<Func
}
}

finalize::<T>(&mut state_stack, std::usize::MAX);
finalize::<T>(&mut state_stack, usize::MAX);

state_stack.pop().map(|mut state| {
state.space.name = path.to_str().map(|name| name.to_string());
Expand Down
2 changes: 1 addition & 1 deletion src/tools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ pub(crate) fn guess_file<S: ::std::hash::BuildHasher>(
new_possibilities.clear();
}

let mut dist_min = std::usize::MAX;
let mut dist_min = usize::MAX;
let mut path_min = Vec::new();
for p in possibilities.iter() {
if current_path == p {
Expand Down

0 comments on commit 2b721ce

Please sign in to comment.