From fe9814e115190b7689251378590f71e5b20f94ab Mon Sep 17 00:00:00 2001 From: mcmah309 Date: Wed, 11 Sep 2024 23:55:06 +0000 Subject: [PATCH] refactor: Formatting --- impl/src/expand.rs | 3 +-- impl/src/resolve.rs | 8 +++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/impl/src/expand.rs b/impl/src/expand.rs index 42a57ad..af54864 100644 --- a/impl/src/expand.rs +++ b/impl/src/expand.rs @@ -177,8 +177,7 @@ fn impl_display(error_enum_node: &ErrorEnumGraphNode, token_stream: &mut TokenSt error_variant_tokens.append_all(quote::quote! { #enum_name::#name => #tokens, }); - } - else { + } else { error_variant_tokens.append_all(quote::quote! { #enum_name::#name => &*format!(#tokens), }); diff --git a/impl/src/resolve.rs b/impl/src/resolve.rs index 8d21380..bd260fc 100644 --- a/impl/src/resolve.rs +++ b/impl/src/resolve.rs @@ -84,7 +84,10 @@ fn resolve_builders_helper<'a>( let ref_error_enum_index = match ref_error_enum_index { Some(e) => e, None => { - return Err(syn::parse::Error::new_spanned(&ref_part, format!("Not a declared error set."))); + return Err(syn::parse::Error::new_spanned( + &ref_part, + format!("Not a declared error set."), + )); } }; if !error_enum_builders[ref_error_enum_index] @@ -110,7 +113,6 @@ fn resolve_builders_helper<'a>( Ok(error_enum_builders[index].error_variants.clone()) } - struct ErrorEnumBuilder { pub attributes: Vec, pub error_name: Ident, @@ -160,4 +162,4 @@ impl std::hash::Hash for ErrorEnumBuilder { } } -impl Eq for ErrorEnumBuilder {} \ No newline at end of file +impl Eq for ErrorEnumBuilder {}