From 6ac3351fd13e317aacebaa8203ed01fc94cc4025 Mon Sep 17 00:00:00 2001 From: Stefan Holderbach Date: Fri, 28 Jul 2023 23:53:36 +0200 Subject: [PATCH] Fix signature for `math mode` (#9846) This command will always return a list, either because there are multiple entries with the same frequency or just one. It's implementation doesn't care about the composition of types as long as they are number like, can be heterogeneous, will report independently. Work for #9812 --- crates/nu-command/src/math/mode.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/nu-command/src/math/mode.rs b/crates/nu-command/src/math/mode.rs index 4f1de19d43..78e783831e 100644 --- a/crates/nu-command/src/math/mode.rs +++ b/crates/nu-command/src/math/mode.rs @@ -43,6 +43,14 @@ impl Command for SubCommand { Type::List(Box::new(Type::Number)), Type::List(Box::new(Type::Number)), ), + ( + Type::List(Box::new(Type::Duration)), + Type::List(Box::new(Type::Duration)), + ), + ( + Type::List(Box::new(Type::Filesize)), + Type::List(Box::new(Type::Filesize)), + ), (Type::Table(vec![]), Type::Record(vec![])), ]) .allow_variants_without_examples(true)