util.rs: simplify wcsfilecmp a bit further

This commit is contained in:
Johannes Altmanninger 2023-02-05 11:59:44 +01:00
parent ba1c5d495f
commit 476b12e06a

View file

@ -228,12 +228,7 @@ fn wcsfilecmp_leading_digits(a: &wstr, b: &wstr) -> (Ordering, usize, usize) {
if ret == Ordering::Equal { if ret == Ordering::Equal {
// Comparing the string value is the same as numerical // Comparing the string value is the same as numerical
// for wchar_t digits! // for wchar_t digits!
if ac > bc { ret = ac.cmp(bc);
ret = Ordering::Greater;
}
if bc > ac {
ret = Ordering::Less;
}
} }
} else { } else {
// We don't have negative numbers and we only allow ints, // We don't have negative numbers and we only allow ints,