git.delta.rocks / jrsonnet / refs/commits / c49885a7c11a

difftreelog

build revert const fns with match

Lach2020-08-25parent: #ee64dfb.patch.diff
in: master

1 file changed

modifiedcrates/jrsonnet-evaluator/src/val.rsdiffbeforeafterboth
177 Func,177 Func,
178}178}
179impl ValType {179impl ValType {
180 pub const fn name(&self) -> &'static str {180 pub fn name(&self) -> &'static str {
181 use ValType::*;181 use ValType::*;
182 match self {182 match self {
183 Bool => "boolean",183 Bool => "boolean",
441 }441 }
442}442}
443443
444const fn is_function_like(val: &Val) -> bool {444fn is_function_like(val: &Val) -> bool {
445 matches!(val, Val::Func(_))445 matches!(val, Val::Func(_))
446}446}
447447