mirror of
https://github.com/astro/deadnix.git
synced 2024-11-24 09:12:50 +03:00
dead_code: fix LambdaArg
This commit is contained in:
parent
00c3d33e79
commit
2db913eb15
@ -68,7 +68,7 @@ fn scan(node: SyntaxNode<NixLanguage>, results: &mut Vec<DeadCode>) {
|
||||
SyntaxKind::NODE_IDENT => {
|
||||
let name = Ident::cast(arg.clone())
|
||||
.expect("Ident::cast");
|
||||
if !find_usage(&name, node.clone()) {
|
||||
if !find_usage(&name, lambda.body().expect("lambda.body()")) {
|
||||
results.push(DeadCode {
|
||||
kind: BindingKind::LambdaArg,
|
||||
name,
|
||||
|
Loading…
Reference in New Issue
Block a user