Skip to content

Commit 27b6f12

Browse files
committed
Rust: Use the suggested cleaner implementation for getStmtOrExpr.
1 parent 7e8e855 commit 27b6f12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rust/ql/lib/codeql/rust/elements/internal/StmtListImpl.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ module Impl {
3333
AstNode getStmtOrExpr(int index) {
3434
result = this.getStatement(index)
3535
or
36-
index = max(int i | i = -1 or exists(this.getStatement(i))) + 1 and
36+
index = this.getNumberOfStatements() and
3737
result = this.getTailExpr()
3838
}
3939

0 commit comments

Comments
 (0)