Skip to content

Commit 4c50c08

Browse files
committed
Rust: Implement good suggestions from ql-for-ql.
1 parent f2f577f commit 4c50c08

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

rust/ql/lib/codeql/rust/frameworks/Reqwest.qll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ private import codeql.rust.Concepts
99
* A call to `reqwest::get` or `reqwest::blocking::get`.
1010
*/
1111
private class ReqwestGet extends RemoteSource::Range {
12-
CallExpr ce;
13-
1412
ReqwestGet() {
15-
this.asExpr().getExpr() = ce and
16-
ce.getExpr().(PathExpr).getPath().getResolvedCrateOrigin().matches("%reqwest") and
17-
ce.getExpr().(PathExpr).getPath().getResolvedPath() = ["crate::get", "crate::blocking::get"]
13+
exists(CallExpr ce |
14+
this.asExpr().getExpr() = ce and
15+
ce.getExpr().(PathExpr).getPath().getResolvedCrateOrigin().matches("%reqwest") and
16+
ce.getExpr().(PathExpr).getPath().getResolvedPath() = ["crate::get", "crate::blocking::get"]
17+
)
1818
}
1919
}

0 commit comments

Comments
 (0)