about summary refs log tree commit diff
path: root/tvix/eval/src/builtins/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src/builtins/mod.rs')
-rw-r--r--tvix/eval/src/builtins/mod.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/tvix/eval/src/builtins/mod.rs b/tvix/eval/src/builtins/mod.rs
index 3c32129e05..3e1f49d699 100644
--- a/tvix/eval/src/builtins/mod.rs
+++ b/tvix/eval/src/builtins/mod.rs
@@ -20,12 +20,12 @@ fn pure_builtins() -> Vec<Builtin> {
         Builtin::new("add", 2, |mut args| {
             let b = args.pop().unwrap();
             let a = args.pop().unwrap();
-            Ok(arithmetic_op!(a, b, +))
+            arithmetic_op!(a, b, +)
         }),
         Builtin::new("abort", 1, |mut args| {
-            return Err(
-                ErrorKind::Abort(args.pop().unwrap().to_string()?.as_str().to_owned()).into(),
-            );
+            return Err(ErrorKind::Abort(
+                args.pop().unwrap().to_string()?.as_str().to_owned(),
+            ));
         }),
         Builtin::new("catAttrs", 2, |mut args| {
             let list = args.pop().unwrap().to_list()?;
@@ -43,7 +43,7 @@ fn pure_builtins() -> Vec<Builtin> {
         Builtin::new("div", 2, |mut args| {
             let b = args.pop().unwrap();
             let a = args.pop().unwrap();
-            Ok(arithmetic_op!(a, b, /))
+            arithmetic_op!(a, b, /)
         }),
         Builtin::new("length", 1, |args| {
             Ok(Value::Integer(args[0].as_list()?.len() as i64))
@@ -81,17 +81,17 @@ fn pure_builtins() -> Vec<Builtin> {
         Builtin::new("mul", 2, |mut args| {
             let b = args.pop().unwrap();
             let a = args.pop().unwrap();
-            Ok(arithmetic_op!(a, b, *))
+            arithmetic_op!(a, b, *)
         }),
         Builtin::new("sub", 2, |mut args| {
             let b = args.pop().unwrap();
             let a = args.pop().unwrap();
-            Ok(arithmetic_op!(a, b, -))
+            arithmetic_op!(a, b, -)
         }),
         Builtin::new("throw", 1, |mut args| {
-            return Err(
-                ErrorKind::Throw(args.pop().unwrap().to_string()?.as_str().to_owned()).into(),
-            );
+            return Err(ErrorKind::Throw(
+                args.pop().unwrap().to_string()?.as_str().to_owned(),
+            ));
         }),
         Builtin::new("toString", 1, |args| {
             // TODO: toString is actually not the same as Display