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:
sterni 2022-09-19 10:59:00 +02:00
parent b79e248959
commit 4bf38df09c

View file

@ -109,9 +109,9 @@ fn pure_builtins() -> Vec<Builtin> {
let s2 = VersionPartsIter::new(s2.as_str());
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::Greater => Ok(Value::Integer(-1)),
std::cmp::Ordering::Greater => Ok(Value::Integer(1)),
}
}),
Builtin::new("div", &[true, true], |mut args, _| {