mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-15 16:10:38 +00:00
refactor: Avoid implicit precondition
This commit is contained in:
parent
ac6c3affdd
commit
fa191cceeb
2 changed files with 3 additions and 5 deletions
|
@ -64,9 +64,8 @@ pub fn define_rule_mapping(mapping: &Mapping) -> proc_macro2::TokenStream {
|
|||
let rule_code_prefix = super::rule_code_prefix::expand(
|
||||
&Ident::new("Rule", Span::call_site()),
|
||||
&Ident::new("RuleCodePrefix", Span::call_site()),
|
||||
mapping.entries.iter().map(|(code, ..)| code),
|
||||
mapping.entries.iter().map(|(code, .., attr)| (code, attr)),
|
||||
|code| code_to_name[code],
|
||||
mapping.entries.iter().map(|(.., attr)| attr),
|
||||
);
|
||||
|
||||
quote! {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue