--- a/crates/jrsonnet-evaluator/src/val.rs +++ b/crates/jrsonnet-evaluator/src/val.rs @@ -177,7 +177,7 @@ Func, } impl ValType { - pub fn name(&self) -> &'static str { + pub const fn name(&self) -> &'static str { use ValType::*; match self { Bool => "boolean", @@ -448,7 +448,7 @@ } } -fn is_function_like(val: &Val) -> bool { +const fn is_function_like(val: &Val) -> bool { matches!(val, Val::Func(_)) }