fix(linter): replace bitwise AND (&) with logical AND (&&) in explici… (#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.
This commit is contained in:
kaykdm 2024-09-15 20:36:13 +09:00 committed by GitHub
parent e613a3d877
commit 148c7a8b82
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;
}