Skip to content

Commit

Permalink
Merge branch 'main' into exhaustive-deps
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscerie authored Oct 21, 2023
2 parents 501d3b9 + cbb0503 commit cfd5e79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions selene-lib/src/lints/if_same_then_else.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ impl Visitor for IfSameThenElseVisitor {
fn visit_if(&mut self, if_block: &ast::If) {
let else_ifs = if_block
.else_if()
.map(|else_ifs| else_ifs.iter().collect())
.unwrap_or_else(Vec::new);
.map(|else_ifs| else_ifs.iter().collect::<Vec<_>>())
.unwrap_or_default();

let mut blocks = Vec::with_capacity(2 + else_ifs.len());
blocks.push(if_block.block());
Expand Down

0 comments on commit cfd5e79

Please sign in to comment.