mirror of
https://github.com/nushell/nushell.git
synced 2024-12-23 23:49:44 +01:00
Fix clippy warnings (#3997)
This commit is contained in:
parent
55eafadf02
commit
0fa0c25fb3
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user