mirror of
https://github.com/nushell/nushell.git
synced 2025-01-12 09:18:56 +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(
|
pub fn process_row(
|
||||||
captured_block: Arc<Box<CapturedBlock>>,
|
captured_block: Arc<CapturedBlock>,
|
||||||
context: Arc<EvaluationContext>,
|
context: Arc<EvaluationContext>,
|
||||||
input: Value,
|
input: Value,
|
||||||
external_redirection: ExternalRedirection,
|
external_redirection: ExternalRedirection,
|
||||||
@ -121,7 +121,7 @@ fn each(args: CommandArgs) -> Result<OutputStream, ShellError> {
|
|||||||
let block: CapturedBlock = args.req(0)?;
|
let block: CapturedBlock = args.req(0)?;
|
||||||
let numbered: bool = args.has_flag("numbered");
|
let numbered: bool = args.has_flag("numbered");
|
||||||
|
|
||||||
let block = Arc::new(Box::new(block));
|
let block = Arc::new(block);
|
||||||
|
|
||||||
if numbered {
|
if numbered {
|
||||||
Ok(args
|
Ok(args
|
||||||
|
@ -43,7 +43,7 @@ impl WholeStreamCommand for EachGroup {
|
|||||||
|
|
||||||
let group_size: Tagged<usize> = args.req(0)?;
|
let group_size: Tagged<usize> = args.req(0)?;
|
||||||
let block: CapturedBlock = args.req(1)?;
|
let block: CapturedBlock = args.req(1)?;
|
||||||
let block = Arc::new(Box::new(block));
|
let block = Arc::new(block);
|
||||||
|
|
||||||
let each_group_iterator = EachGroupIterator {
|
let each_group_iterator = EachGroupIterator {
|
||||||
block,
|
block,
|
||||||
@ -58,7 +58,7 @@ impl WholeStreamCommand for EachGroup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct EachGroupIterator {
|
struct EachGroupIterator {
|
||||||
block: Arc<Box<CapturedBlock>>,
|
block: Arc<CapturedBlock>,
|
||||||
context: Arc<EvaluationContext>,
|
context: Arc<EvaluationContext>,
|
||||||
group_size: usize,
|
group_size: usize,
|
||||||
input: InputStream,
|
input: InputStream,
|
||||||
@ -96,7 +96,7 @@ impl Iterator for EachGroupIterator {
|
|||||||
|
|
||||||
pub(crate) fn run_block_on_vec(
|
pub(crate) fn run_block_on_vec(
|
||||||
input: Vec<Value>,
|
input: Vec<Value>,
|
||||||
block: Arc<Box<CapturedBlock>>,
|
block: Arc<CapturedBlock>,
|
||||||
context: Arc<EvaluationContext>,
|
context: Arc<EvaluationContext>,
|
||||||
external_redirection: ExternalRedirection,
|
external_redirection: ExternalRedirection,
|
||||||
) -> OutputStream {
|
) -> OutputStream {
|
||||||
|
@ -49,7 +49,7 @@ impl WholeStreamCommand for EachWindow {
|
|||||||
let block: CapturedBlock = args.req(1)?;
|
let block: CapturedBlock = args.req(1)?;
|
||||||
let stride: Option<Tagged<usize>> = args.get_flag("stride")?;
|
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
|
let mut window: Vec<_> = args
|
||||||
.input
|
.input
|
||||||
|
@ -137,7 +137,7 @@ pub fn group_by(args: CommandArgs) -> Result<OutputStream, ShellError> {
|
|||||||
value: UntaggedValue::Block(block_given),
|
value: UntaggedValue::Block(block_given),
|
||||||
..
|
..
|
||||||
}) => {
|
}) => {
|
||||||
let block = Arc::new(block_given);
|
let block = Arc::new(*block_given);
|
||||||
let error_key = "error";
|
let error_key = "error";
|
||||||
|
|
||||||
for value in &values {
|
for value in &values {
|
||||||
|
Loading…
Reference in New Issue
Block a user