From cbbe4500f34d5a9eb65c0f283dd1b46e4db2b06c Mon Sep 17 00:00:00 2001 From: Petr Portnov Date: Sun, 09 Apr 2023 19:11:29 +0000 Subject: [PATCH] feat: limit `xor` usage to `bool`s --- --- a/crates/jrsonnet-stdlib/src/operator.rs +++ b/crates/jrsonnet-stdlib/src/operator.rs @@ -34,8 +34,8 @@ } #[builtin] -pub fn builtin_xor(x: Val, y: Val) -> Result { - Ok(!equals(&x, &y)?) +pub fn builtin_xor(x: bool, y: bool) -> bool { + x ^ y } #[builtin] -- gitstuff