From 6a6d2dd82178b659aa874383af89a862dab17428 Mon Sep 17 00:00:00 2001 From: Christopher Chang <51393127+chriscerie@users.noreply.github.com> Date: Sat, 25 May 2024 12:25:40 -0700 Subject: [PATCH] Fix clippy --- selene-lib/src/ast_util/scopes.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/selene-lib/src/ast_util/scopes.rs b/selene-lib/src/ast_util/scopes.rs index 3e3b6ff2..dadcd47e 100644 --- a/selene-lib/src/ast_util/scopes.rs +++ b/selene-lib/src/ast_util/scopes.rs @@ -830,11 +830,7 @@ impl Visitor for ScopeVisitor { fn visit_block(&mut self, block: &ast::Block) { if let Some((start, end)) = block.range() { - if self - .else_blocks - .get(&(start.bytes(), end.bytes())) - .is_some() - { + if self.else_blocks.contains(&(start.bytes(), end.bytes())) { self.close_scope(); // close the if or elseif's block self.open_scope(block); } @@ -843,11 +839,7 @@ impl Visitor for ScopeVisitor { fn visit_block_end(&mut self, block: &ast::Block) { if let Some((start, end)) = block.range() { - if self - .else_blocks - .get(&(start.bytes(), end.bytes())) - .is_some() - { + if self.else_blocks.contains(&(start.bytes(), end.bytes())) { self.close_scope(); } }