fix(tvix/eval): fix flipped sign in builtins.compareVersions
Change-Id: I42fc0dc633fbd525eaa35689a41ec3717f4352a2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6690 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
This commit is contained in:
parent
b79e248959
commit
4bf38df09c
1 changed files with 2 additions and 2 deletions
|
@ -109,9 +109,9 @@ fn pure_builtins() -> Vec<Builtin> {
|
||||||
let s2 = VersionPartsIter::new(s2.as_str());
|
let s2 = VersionPartsIter::new(s2.as_str());
|
||||||
|
|
||||||
match s1.cmp(s2) {
|
match s1.cmp(s2) {
|
||||||
std::cmp::Ordering::Less => Ok(Value::Integer(1)),
|
std::cmp::Ordering::Less => Ok(Value::Integer(-1)),
|
||||||
std::cmp::Ordering::Equal => Ok(Value::Integer(0)),
|
std::cmp::Ordering::Equal => Ok(Value::Integer(0)),
|
||||||
std::cmp::Ordering::Greater => Ok(Value::Integer(-1)),
|
std::cmp::Ordering::Greater => Ok(Value::Integer(1)),
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
Builtin::new("div", &[true, true], |mut args, _| {
|
Builtin::new("div", &[true, true], |mut args, _| {
|
||||||
|
|
Loading…
Reference in a new issue