From aab1050b2ad5bedb4d25dd1b5107cdc6bc52507d Mon Sep 17 00:00:00 2001 From: Petr Portnov | PROgrm_JARvis Date: Wed, 30 Nov 2022 08:10:14 +0000 Subject: [PATCH] Merge pull request #94 from jackatbancast/fixup-is_x-builtins-variable-names --- --- a/crates/jrsonnet-stdlib/src/types.rs +++ b/crates/jrsonnet-stdlib/src/types.rs @@ -1,31 +1,31 @@ use jrsonnet_evaluator::{error::Result, function::builtin, typed::Any, IStr, Val}; #[builtin] -pub fn builtin_type(x: Any) -> Result { - Ok(x.0.value_type().name().into()) +pub fn builtin_type(v: Any) -> Result { + Ok(v.0.value_type().name().into()) } #[builtin] -pub fn builtin_is_string(x: Any) -> Result { - Ok(matches!(x.0, Val::Str(_))) +pub fn builtin_is_string(v: Any) -> Result { + Ok(matches!(v.0, Val::Str(_))) } #[builtin] -pub fn builtin_is_number(x: Any) -> Result { - Ok(matches!(x.0, Val::Num(_))) +pub fn builtin_is_number(v: Any) -> Result { + Ok(matches!(v.0, Val::Num(_))) } #[builtin] -pub fn builtin_is_boolean(x: Any) -> Result { - Ok(matches!(x.0, Val::Bool(_))) +pub fn builtin_is_boolean(v: Any) -> Result { + Ok(matches!(v.0, Val::Bool(_))) } #[builtin] -pub fn builtin_is_object(x: Any) -> Result { - Ok(matches!(x.0, Val::Obj(_))) +pub fn builtin_is_object(v: Any) -> Result { + Ok(matches!(v.0, Val::Obj(_))) } #[builtin] -pub fn builtin_is_array(x: Any) -> Result { - Ok(matches!(x.0, Val::Arr(_))) +pub fn builtin_is_array(v: Any) -> Result { + Ok(matches!(v.0, Val::Arr(_))) } #[builtin] -pub fn builtin_is_function(x: Any) -> Result { - Ok(matches!(x.0, Val::Func(_))) +pub fn builtin_is_function(v: Any) -> Result { + Ok(matches!(v.0, Val::Func(_))) } -- gitstuff