Skip to content

Commit

Permalink
refactor: Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmah309 committed Sep 11, 2024
1 parent fe906e5 commit fe9814e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 1 addition & 2 deletions impl/src/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
});
Expand Down
8 changes: 5 additions & 3 deletions impl/src/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -110,7 +113,6 @@ fn resolve_builders_helper<'a>(
Ok(error_enum_builders[index].error_variants.clone())
}


struct ErrorEnumBuilder {
pub attributes: Vec<Attribute>,
pub error_name: Ident,
Expand Down Expand Up @@ -160,4 +162,4 @@ impl std::hash::Hash for ErrorEnumBuilder {
}
}

impl Eq for ErrorEnumBuilder {}
impl Eq for ErrorEnumBuilder {}

0 comments on commit fe9814e

Please sign in to comment.