Fix some clippy::complexity
This commit is contained in:
parent
6fceb0f645
commit
81c320ea77
28 changed files with 62 additions and 63 deletions
|
@ -119,7 +119,7 @@ impl DiagnosticDeriveBuilder {
|
|||
impl<'a> DiagnosticDeriveVariantBuilder<'a> {
|
||||
/// Generates calls to `code` and similar functions based on the attributes on the type or
|
||||
/// variant.
|
||||
pub fn preamble<'s>(&mut self, variant: &VariantInfo<'s>) -> TokenStream {
|
||||
pub fn preamble(&mut self, variant: &VariantInfo<'_>) -> TokenStream {
|
||||
let ast = variant.ast();
|
||||
let attrs = &ast.attrs;
|
||||
let preamble = attrs.iter().map(|attr| {
|
||||
|
@ -133,7 +133,7 @@ impl<'a> DiagnosticDeriveVariantBuilder<'a> {
|
|||
|
||||
/// Generates calls to `span_label` and similar functions based on the attributes on fields or
|
||||
/// calls to `set_arg` when no attributes are present.
|
||||
pub fn body<'s>(&mut self, variant: &VariantInfo<'s>) -> TokenStream {
|
||||
pub fn body(&mut self, variant: &VariantInfo<'_>) -> TokenStream {
|
||||
let mut body = quote! {};
|
||||
// Generate `set_arg` calls first..
|
||||
for binding in variant.bindings().iter().filter(|bi| should_generate_set_arg(bi.ast())) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue