mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-04 15:07:47 +00:00
refactor/polish ~ fix cargo clippy
complaints (allow comparison_chain)
This commit is contained in:
parent
5094d6ffcc
commit
784887cc84
1 changed files with 2 additions and 0 deletions
|
@ -491,8 +491,10 @@ fn month_compare(a: &str, b: &str) -> Ordering {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn version_compare(a: &str, b: &str) -> Ordering {
|
fn version_compare(a: &str, b: &str) -> Ordering {
|
||||||
|
#![allow(clippy::comparison_chain)]
|
||||||
let ver_a = Version::parse(a);
|
let ver_a = Version::parse(a);
|
||||||
let ver_b = Version::parse(b);
|
let ver_b = Version::parse(b);
|
||||||
|
// Version::cmp is not implemented; implement comparison directly
|
||||||
if ver_a > ver_b {
|
if ver_a > ver_b {
|
||||||
Ordering::Greater
|
Ordering::Greater
|
||||||
} else if ver_a < ver_b {
|
} else if ver_a < ver_b {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue