refactor: replace deprecating usize::max_value() with usize::MAX

This commit is contained in:
Narawit Rakket 2022-07-03 00:41:00 +07:00 committed by Abin Simon
parent 5bd705b4d2
commit fd12e4a144

View file

@ -84,7 +84,7 @@ impl Recursion {
} }
} }
Ok(usize::max_value()) Ok(usize::MAX)
} }
/// Get a potential "depth" value from [ArgMatches]. /// Get a potential "depth" value from [ArgMatches].
@ -121,7 +121,7 @@ impl Recursion {
impl Default for Recursion { impl Default for Recursion {
fn default() -> Self { fn default() -> Self {
Self { Self {
depth: usize::max_value(), depth: usize::MAX,
enabled: false, enabled: false,
} }
} }
@ -267,7 +267,7 @@ mod test {
fn test_depth_from_config_none_max() { fn test_depth_from_config_none_max() {
let argv = ["lsd"]; let argv = ["lsd"];
assert_eq!( assert_eq!(
usize::max_value(), usize::MAX,
Recursion::depth_from( Recursion::depth_from(
&app::build().get_matches_from_safe(argv).unwrap(), &app::build().get_matches_from_safe(argv).unwrap(),
&Config::with_none() &Config::with_none()