Skip to content

Commit

Permalink
Use filter
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscerie committed Mar 27, 2024
1 parent f254c94 commit 99184b0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions selene-lib/src/lints/deprecated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,11 @@ impl Visitor for DeprecatedVisitor<'_> {
..
}) = self.standard_library.find_global(&name_path)
{
for (arg, arg_std) in arguments.iter().zip(&function.arguments) {
if arg.display == "nil" {
continue;
}

for (arg, arg_std) in arguments
.iter()
.zip(&function.arguments)
.filter(|(arg, _)| arg.display != "nil")
{
if let Some(deprecated) = &arg_std.deprecated {
self.diagnostics.push(Diagnostic::new_complete(
"deprecated",
Expand Down

0 comments on commit 99184b0

Please sign in to comment.