Apply nightly clippy fixes (#9381)

# Description
New lints coming from `cargo +nightly clippy`

Manually checked for problems.


# User-Facing Changes
None

# Tests + Formatting
(-)
This commit is contained in:
Stefan Holderbach
2023-06-08 18:49:58 +02:00
committed by GitHub
parent 74ba00a222
commit a5dd93d154
8 changed files with 21 additions and 23 deletions

View File

@ -464,7 +464,7 @@ pub fn parse_def(
*declaration = signature.clone().into_block_command(block_id);
let mut block = working_set.get_block_mut(block_id);
let block = working_set.get_block_mut(block_id);
let calls_itself = block_calls_itself(block, decl_id);
block.recursive = Some(calls_itself);
block.signature = signature;

View File

@ -1587,7 +1587,7 @@ pub fn parse_brace_expr(
.get(1)
.map(|token| working_set.get_span_contents(token.span));
if matches!(second_token, None) {
if second_token.is_none() {
// If we're empty, that means an empty record or closure
if matches!(shape, SyntaxShape::Closure(_)) {
parse_closure_expression(working_set, shape, span)