feat: Simplify inner-call release detection logic in resource filtering

This commit is contained in:
elipeter 2026-05-02 21:49:01 -04:00
parent ebe4a15a72
commit 064801a3a4

View file

@ -65,10 +65,11 @@ fn find_release_nodes(ctx: &AnalysisContext, release_patterns: &[&str]) -> Vec<N
.node_indices()
.filter(|&idx| {
let info = &ctx.cfg[idx];
if let Some(callee) = &info.call.callee {
if info.kind == StmtKind::Call && matches_release(callee) {
return true;
}
if let Some(callee) = &info.call.callee
&& info.kind == StmtKind::Call
&& matches_release(callee)
{
return true;
}
// Inner-call-release-in-arg: any kind, the close lives in an
// argument to the outer wrapper.