Skip to content

Commit 99184b0

Browse files
committed
Use filter
1 parent f254c94 commit 99184b0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

selene-lib/src/lints/deprecated.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,11 @@ impl Visitor for DeprecatedVisitor<'_> {
229229
..
230230
}) = self.standard_library.find_global(&name_path)
231231
{
232-
for (arg, arg_std) in arguments.iter().zip(&function.arguments) {
233-
if arg.display == "nil" {
234-
continue;
235-
}
236-
232+
for (arg, arg_std) in arguments
233+
.iter()
234+
.zip(&function.arguments)
235+
.filter(|(arg, _)| arg.display != "nil")
236+
{
237237
if let Some(deprecated) = &arg_std.deprecated {
238238
self.diagnostics.push(Diagnostic::new_complete(
239239
"deprecated",

0 commit comments

Comments
 (0)