From 48672f8e30bc5b3a8fc7e2a685fc34063b352aed Mon Sep 17 00:00:00 2001 From: utam0k Date: Mon, 8 Jun 2020 01:15:57 +0900 Subject: [PATCH] Assign variables when passed as an argument. (#1947) --- crates/nu-cli/src/commands/command.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/crates/nu-cli/src/commands/command.rs b/crates/nu-cli/src/commands/command.rs index 5b2884fb36..77b51a4d2a 100644 --- a/crates/nu-cli/src/commands/command.rs +++ b/crates/nu-cli/src/commands/command.rs @@ -384,18 +384,16 @@ impl WholeStreamCommand for FnFilterCommand { async fn run( &self, - args: CommandArgs, - registry: &CommandRegistry, - ) -> Result { - let CommandArgs { + CommandArgs { host, ctrl_c, shell_manager, call_info, mut input, .. - } = args; - + }: CommandArgs, + registry: &CommandRegistry, + ) -> Result { let host: Arc> = host.clone(); let registry: CommandRegistry = registry.clone(); let func = self.func;