1use std::cmp::Ordering;23use jrsonnet_evaluator::{function::builtin, operator::evaluate_compare_op, Result, Val};45#[builtin]6#[allow(non_snake_case)]7pub fn builtin___compare(v1: Val, v2: Val) -> Result<i32> {8 Ok(9 match evaluate_compare_op(&v1, &v2, jrsonnet_parser::BinaryOpType::Lt)? {10 Ordering::Less => -1,11 Ordering::Equal => 0,12 Ordering::Greater => 1,13 },14 )15}difftreelog
source
crates/jrsonnet-stdlib/src/compat.rs379 Bsourcehistory