Skip to content

Commit

Permalink
fix(linter): replace bitwise AND (&) with logical AND (&&) in explici… (
Browse files Browse the repository at this point in the history
#5780)

…t_function_return_type rule

This PR fixes an issue where the Bitwise AND (&) operator was mistakenly
used in a conditional statement, instead of the Logical AND (&&)
operator.
  • Loading branch information
kaykdm authored Sep 15, 2024
1 parent e613a3d commit 148c7a8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ impl Rule for ExplicitFunctionReturnType {
fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) {
match node.kind() {
AstKind::Function(func) => {
if !func.is_declaration() & !func.is_expression() {
if !func.is_declaration() && !func.is_expression() {
return;
}

Expand Down

0 comments on commit 148c7a8

Please sign in to comment.