mirror of
https://github.com/lsd-rs/lsd
synced 2025-03-04 23:17:15 +00:00
refactor: replace deprecating usize::max_value()
with usize::MAX
This commit is contained in:
parent
5bd705b4d2
commit
fd12e4a144
1 changed files with 3 additions and 3 deletions
|
@ -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()
|
||||||
|
|
Loading…
Add table
Reference in a new issue