From ff8c3aa3569888e7c8ff54c8044a8655a477296d Mon Sep 17 00:00:00 2001 From: Stefan Holderbach Date: Fri, 28 Jul 2023 23:32:59 +0200 Subject: [PATCH] Fix signature for `math abs` (#9844) This only supports number or duration Make sure duration still works with the stricter type system Work for #9812 --- crates/nu-command/src/math/abs.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/nu-command/src/math/abs.rs b/crates/nu-command/src/math/abs.rs index 574a6b3bf8..75dae0630e 100644 --- a/crates/nu-command/src/math/abs.rs +++ b/crates/nu-command/src/math/abs.rs @@ -14,10 +14,15 @@ impl Command for SubCommand { Signature::build("math abs") .input_output_types(vec![ (Type::Number, Type::Number), + (Type::Duration, Type::Duration), ( Type::List(Box::new(Type::Number)), Type::List(Box::new(Type::Number)), ), + ( + Type::List(Box::new(Type::Duration)), + Type::List(Box::new(Type::Duration)), + ), ]) .allow_variants_without_examples(true) .category(Category::Math)