Skip to content

Commit 4b21223

Browse files
committed
Rust: Remove unnecessary .(BlockExpr).
1 parent 61481b5 commit 4b21223

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rust/ql/examples/snippets/empty_if.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import rust
1212
from IfExpr ifExpr
1313
where
1414
// where the 'then' branch is empty
15-
ifExpr.getThen().(BlockExpr).getStmtList().getNumberOfStmtOrExpr() = 0 and
15+
ifExpr.getThen().getStmtList().getNumberOfStmtOrExpr() = 0 and
1616
// and no 'else' branch exists
1717
not exists(ifExpr.getElse())
1818
select ifExpr, "This 'if' expression is redundant."

0 commit comments

Comments
 (0)