-
-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Feel free to wontfix my request because I do get that it is nitpicking :)
I am considering your lib to replace some of the logic in the rust coreutils
https://github.com/uutils/coreutils/blob/main/src/uucore/src/lib/mods/version_cmp.rs#L57
I noticed that GNU sort version a bit differently than version-compare:
$ echo "
5.4.0
5.04.0"| sort --stable --sort=version
5.4.0
5.04.0
With this crate, the following code is failing:
use version_compare::{compare, compare_to, Cmp, Version};
fn main() {
let a = "string start 5.04.0 end of str";
let b = "string start 5.4.0 end of str";
assert_eq!(a > b, true);
}
as the code considers that 5.04.0 is smaller than 5.4.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels