mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 14:36:08 +02:00
Contentious clippy fixes (#13498)
Lints from stable or nightly toolchain that may have questionable added value. - **Contentious lint to contract into single `if let`** - **Potential false positive around `AsRef`/`Deref` fun**
This commit is contained in:
committed by
GitHub
parent
ae5fed41ed
commit
2c6b1471e1
@ -300,21 +300,21 @@ pub fn parse_for(working_set: &mut StateWorkingSet, lite_command: &LiteCommand)
|
||||
}
|
||||
|
||||
// Let's get our block and make sure it has the right signature
|
||||
if let Some(arg) = call.positional_nth(2) {
|
||||
match arg {
|
||||
Expression {
|
||||
expr: Expr::Block(block_id),
|
||||
..
|
||||
}
|
||||
| Expression {
|
||||
expr: Expr::RowCondition(block_id),
|
||||
..
|
||||
} => {
|
||||
let block = working_set.get_block_mut(*block_id);
|
||||
if let Some(
|
||||
Expression {
|
||||
expr: Expr::Block(block_id),
|
||||
..
|
||||
}
|
||||
| Expression {
|
||||
expr: Expr::RowCondition(block_id),
|
||||
..
|
||||
},
|
||||
) = call.positional_nth(2)
|
||||
{
|
||||
{
|
||||
let block = working_set.get_block_mut(*block_id);
|
||||
|
||||
block.signature = Box::new(sig);
|
||||
}
|
||||
_ => {}
|
||||
block.signature = Box::new(sig);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user