mirror of
https://github.com/YGGverse/plurify.git
synced 2026-03-31 17:15:36 +00:00
use usize::min function
This commit is contained in:
parent
97ba2aa4f8
commit
37da5d5a66
1 changed files with 1 additions and 1 deletions
|
|
@ -19,6 +19,6 @@ pub fn ns<'a>(n: usize, s: &[&'a str]) -> &'a str {
|
|||
s[if (n % 100) > 4 && (n % 100) < 20 {
|
||||
2
|
||||
} else {
|
||||
[2, 0, 1, 1, 1, 2][std::cmp::min(n % 10, 5)]
|
||||
[2, 0, 1, 1, 1, 2][usize::min(n % 10, 5)]
|
||||
}]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue