From a477a2b221507db8b1679b23cce847ef545dba0f Mon Sep 17 00:00:00 2001 From: Jelte Fennema Date: Tue, 4 Jul 2023 00:29:05 +0200 Subject: [PATCH] Run cargo fmt, it seems to have some new rules --- impl/src/fmt/display.rs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/impl/src/fmt/display.rs b/impl/src/fmt/display.rs index 0e9983a5..7eb893e4 100644 --- a/impl/src/fmt/display.rs +++ b/impl/src/fmt/display.rs @@ -331,12 +331,16 @@ impl<'a> Expansion<'a> { /// Generates trait bounds for a struct or an enum variant. fn generate_bounds(&self) -> Vec { let Some(fmt) = &self.attrs.fmt else { - return self.fields.iter().next().map(|f| { - let ty = &f.ty; - let trait_ident = &self.trait_ident; - vec![parse_quote! { #ty: ::core::fmt::#trait_ident }] - }) - .unwrap_or_default(); + return self + .fields + .iter() + .next() + .map(|f| { + let ty = &f.ty; + let trait_ident = &self.trait_ident; + vec![parse_quote! { #ty: ::core::fmt::#trait_ident }] + }) + .unwrap_or_default(); }; fmt.bounded_types(self.fields)