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( async fn run(
&self, &self,
args: CommandArgs, CommandArgs {
registry: &CommandRegistry,
) -> Result<OutputStream, ShellError> {
let CommandArgs {
host, host,
ctrl_c, ctrl_c,
shell_manager, shell_manager,
call_info, call_info,
mut input, mut input,
.. ..
} = args; }: CommandArgs,
registry: &CommandRegistry,
) -> Result<OutputStream, ShellError> {
let host: Arc<parking_lot::Mutex<dyn Host>> = host.clone(); let host: Arc<parking_lot::Mutex<dyn Host>> = host.clone();
let registry: CommandRegistry = registry.clone(); let registry: CommandRegistry = registry.clone();
let func = self.func; let func = self.func;