1
Fork 0
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:
Roy Ivy III 2019-12-29 00:48:38 -06:00
parent 5094d6ffcc
commit 784887cc84

View file

@ -491,8 +491,10 @@ fn month_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_b = Version::parse(b);
// Version::cmp is not implemented; implement comparison directly
if ver_a > ver_b {
Ordering::Greater
} else if ver_a < ver_b {