Remove Arc from Arguments (#405)

This commit is contained in:
onthebridgetonowhere 2021-12-02 22:07:36 +01:00 committed by GitHub
parent ccd5f59314
commit 687fefd791
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,7 +4,6 @@ use nu_protocol::{
engine::{Command, EngineState, Stack}, engine::{Command, EngineState, Stack},
Example, PipelineData, ShellError, Signature, Span, SyntaxShape, Value, Example, PipelineData, ShellError, Signature, Span, SyntaxShape, Value,
}; };
use std::sync::Arc;
#[derive(Clone)] #[derive(Clone)]
pub struct SubCommand; pub struct SubCommand;
@ -126,10 +125,10 @@ where
{ {
let head = call.head; let head = call.head;
let (options, closure_flags, input) = ( let (options, closure_flags, input) = (
Arc::new(Arguments { Arguments {
character: call.get_flag(engine_state, stack, "char")?, character: call.get_flag(engine_state, stack, "char")?,
column_paths: call.rest(engine_state, stack, 0)?, column_paths: call.rest(engine_state, stack, 0)?,
}), },
ClosureFlags { ClosureFlags {
all_flag: call.has_flag("all"), all_flag: call.has_flag("all"),
left_trim: call.has_flag("left"), left_trim: call.has_flag("left"),