From a5d03b1d6efc41e817d11ce0a9c515bc4629a74b Mon Sep 17 00:00:00 2001 From: Devyn Cairns Date: Sat, 16 Mar 2024 14:01:09 -0700 Subject: [PATCH] Fix zip signature to mention closure input type (#12216) # Description `help zip` now reports: ``` other : The other input, or closure returning a stream. ``` Thanks to @edhowland for pointing this out :heart: # User-Facing Changes - Doc change for zip # Tests + Formatting - :green_circle: `toolkit fmt` - :green_circle: `toolkit clippy` - :green_circle: `toolkit test` - :green_circle: `toolkit test stdlib` # After Submitting --- crates/nu-command/src/filters/zip.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/nu-command/src/filters/zip.rs b/crates/nu-command/src/filters/zip.rs index 22ea6499ac..a4cdfc759c 100644 --- a/crates/nu-command/src/filters/zip.rs +++ b/crates/nu-command/src/filters/zip.rs @@ -30,7 +30,11 @@ impl Command for Zip { Type::List(Box::new(Type::List(Box::new(Type::Any)))), ), ]) - .required("other", SyntaxShape::Any, "The other input.") + .required( + "other", + SyntaxShape::OneOf(vec![SyntaxShape::Any, SyntaxShape::Closure(Some(vec![]))]), + "The other input, or closure returning a stream.", + ) .category(Category::Filters) }