From 72d09ff27dee3b7b74ce93a16d4aa54db00e98e9 Mon Sep 17 00:00:00 2001 From: Pranav Gaddamadugu <23022326+d0cd@users.noreply.github.com> Date: Tue, 2 Jul 2024 18:37:23 -0700 Subject: [PATCH] Clippy --- compiler/passes/src/type_checking/check_program.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/compiler/passes/src/type_checking/check_program.rs b/compiler/passes/src/type_checking/check_program.rs index bfc3ce178d..39c859fe03 100644 --- a/compiler/passes/src/type_checking/check_program.rs +++ b/compiler/passes/src/type_checking/check_program.rs @@ -154,10 +154,8 @@ impl<'a, N: Network> ProgramVisitor<'a> for TypeChecker<'a, N> { check_has_field(sym::owner, Type::Address); } // For structs, check that there is at least one member. - else { - if input.members.is_empty() { - self.emit_err(TypeCheckerError::empty_struct(input.span())); - } + else if input.members.is_empty() { + self.emit_err(TypeCheckerError::empty_struct(input.span())); } if !(input.is_record && self.scope_state.is_stub) {