Skip to content

Commit 3d3b785

Browse files
committed
Rust: Remove redundant infix casts
1 parent e78b79f commit 3d3b785

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

rust/ql/lib/codeql/rust/frameworks/rustcrypto/RustCrypto.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class StreamCipherInit extends Cryptography::CryptographicOperation::Range {
2727
p.getResolvedCrateOrigin().matches("%/RustCrypto%") and
2828
p.getPath().getText() = ["new", "new_from_slice", "new_from_slices", "new_with_eff_key_len"] and
2929
(
30-
rawAlgorithmName = p.getPath().getQualifier().(Path).getText() or // todo: remove infix cast when codegenerator has been fixed
30+
rawAlgorithmName = p.getPath().getQualifier().getText() or
3131
rawAlgorithmName =
3232
p.getPath()
3333
.getQualifier()

rust/ql/lib/codeql/rust/security/WeakSensitiveDataHashingExtensions.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ class ModeledHashOperation extends Cryptography::CryptographicOperation::Range {
186186
sinkNode(input, "hasher-input") and
187187
call = input.(Node::FlowSummaryNode).getSinkElement().getCall() and
188188
call = this.asExpr().getExpr() and
189-
algorithmName = call.getFunction().(PathExpr).getPath().getQualifier().(Path).getText() // todo: remove infix cast when codegenerator has been fixed
189+
algorithmName = call.getFunction().(PathExpr).getPath().getQualifier().getText()
190190
)
191191
}
192192

0 commit comments

Comments
 (0)