Assign variables when passed as an argument. (#1947)

This commit is contained in:
utam0k 2020-06-08 01:15:57 +09:00 committed by GitHub
parent 160191e9f4
commit 48672f8e30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -384,18 +384,16 @@ impl WholeStreamCommand for FnFilterCommand {
async fn run(
&self,
args: CommandArgs,
registry: &CommandRegistry,
) -> Result<OutputStream, ShellError> {
let CommandArgs {
CommandArgs {
host,
ctrl_c,
shell_manager,
call_info,
mut input,
..
} = args;
}: CommandArgs,
registry: &CommandRegistry,
) -> Result<OutputStream, ShellError> {
let host: Arc<parking_lot::Mutex<dyn Host>> = host.clone();
let registry: CommandRegistry = registry.clone();
let func = self.func;