Fix clippy warnings (#3997)

This commit is contained in:
JT 2021-09-10 13:13:11 +12:00 committed by GitHub
parent 55eafadf02
commit 0fa0c25fb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 7 deletions

View File

@ -69,7 +69,7 @@ impl WholeStreamCommand for Each {
}
pub fn process_row(
captured_block: Arc<Box<CapturedBlock>>,
captured_block: Arc<CapturedBlock>,
context: Arc<EvaluationContext>,
input: Value,
external_redirection: ExternalRedirection,
@ -121,7 +121,7 @@ fn each(args: CommandArgs) -> Result<OutputStream, ShellError> {
let block: CapturedBlock = args.req(0)?;
let numbered: bool = args.has_flag("numbered");
let block = Arc::new(Box::new(block));
let block = Arc::new(block);
if numbered {
Ok(args

View File

@ -43,7 +43,7 @@ impl WholeStreamCommand for EachGroup {
let group_size: Tagged<usize> = args.req(0)?;
let block: CapturedBlock = args.req(1)?;
let block = Arc::new(Box::new(block));
let block = Arc::new(block);
let each_group_iterator = EachGroupIterator {
block,
@ -58,7 +58,7 @@ impl WholeStreamCommand for EachGroup {
}
struct EachGroupIterator {
block: Arc<Box<CapturedBlock>>,
block: Arc<CapturedBlock>,
context: Arc<EvaluationContext>,
group_size: usize,
input: InputStream,
@ -96,7 +96,7 @@ impl Iterator for EachGroupIterator {
pub(crate) fn run_block_on_vec(
input: Vec<Value>,
block: Arc<Box<CapturedBlock>>,
block: Arc<CapturedBlock>,
context: Arc<EvaluationContext>,
external_redirection: ExternalRedirection,
) -> OutputStream {

View File

@ -49,7 +49,7 @@ impl WholeStreamCommand for EachWindow {
let block: CapturedBlock = args.req(1)?;
let stride: Option<Tagged<usize>> = args.get_flag("stride")?;
let block = Arc::new(Box::new(block));
let block = Arc::new(block);
let mut window: Vec<_> = args
.input

View File

@ -137,7 +137,7 @@ pub fn group_by(args: CommandArgs) -> Result<OutputStream, ShellError> {
value: UntaggedValue::Block(block_given),
..
}) => {
let block = Arc::new(block_given);
let block = Arc::new(*block_given);
let error_key = "error";
for value in &values {