diff options
Diffstat (limited to 'tvix/eval/src/builtins/mod.rs')
-rw-r--r-- | tvix/eval/src/builtins/mod.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tvix/eval/src/builtins/mod.rs b/tvix/eval/src/builtins/mod.rs index 99a63c97998d..49f047543994 100644 --- a/tvix/eval/src/builtins/mod.rs +++ b/tvix/eval/src/builtins/mod.rs @@ -43,11 +43,10 @@ fn pure_builtins() -> Vec<Builtin> { Ok(Value::Bool(matches!(args[0], Value::Float(_)))) }), Builtin::new("isFunction", 1, |args| { - Ok(Value::Bool(match args[0] { - Value::Closure(_) => true, - Value::Builtin(_) => true, - _ => false, - })) + Ok(Value::Bool(matches!( + args[0], + Value::Closure(_) | Value::Builtin(_) + ))) }), Builtin::new("isInt", 1, |args| { Ok(Value::Bool(matches!(args[0], Value::Integer(_)))) |