We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61481b5 commit 4b21223Copy full SHA for 4b21223
rust/ql/examples/snippets/empty_if.ql
@@ -12,7 +12,7 @@ import rust
12
from IfExpr ifExpr
13
where
14
// where the 'then' branch is empty
15
- ifExpr.getThen().(BlockExpr).getStmtList().getNumberOfStmtOrExpr() = 0 and
+ ifExpr.getThen().getStmtList().getNumberOfStmtOrExpr() = 0 and
16
// and no 'else' branch exists
17
not exists(ifExpr.getElse())
18
select ifExpr, "This 'if' expression is redundant."
0 commit comments