Turn Linters', etc. implicit into_iter()s into explicit rules() (#5436)

## Summary

As discussed on ~IRC~ Discord, this will make it easier for e.g. the
docs generation stuff to get all rules for a linter (using
`all_rules()`) instead of just non-nursery ones, and it also makes it
more Explicit Is Better Than Implicit to iterate over linter rules.

Grepping for `Item = Rule` reveals some remaining implicit
`IntoIterator`s that I didn't feel were necessarily in scope for this
(and honestly, iterating over a `RuleSet` makes sense).
This commit is contained in:
Aarni Koskela 2023-07-04 02:35:16 +03:00 committed by GitHub
parent a647f31600
commit 6acc316d19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 50 additions and 52 deletions

View file

@ -102,10 +102,10 @@ pub(crate) fn generate() -> String {
));
table_out.push('\n');
table_out.push('\n');
generate_table(&mut table_out, prefix, &linter);
generate_table(&mut table_out, prefix.clone().rules(), &linter);
}
} else {
generate_table(&mut table_out, &linter, &linter);
generate_table(&mut table_out, linter.rules(), &linter);
}
}