From 6ba0a46c8896fff1f57b4b8b1ca501ff24915908 Mon Sep 17 00:00:00 2001 From: Christopher Chang <51393127+chriscerie@users.noreply.github.com> Date: Sat, 21 Oct 2023 14:25:34 -0700 Subject: [PATCH] Fix clippy error --- selene-lib/src/lints/if_same_then_else.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/selene-lib/src/lints/if_same_then_else.rs b/selene-lib/src/lints/if_same_then_else.rs index 502e1bbf..c8874b9c 100644 --- a/selene-lib/src/lints/if_same_then_else.rs +++ b/selene-lib/src/lints/if_same_then_else.rs @@ -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::>()) + .unwrap_or_default(); let mut blocks = Vec::with_capacity(2 + else_ifs.len()); blocks.push(if_block.block());