Clean up macro code a bit
This commit is contained in:
parent
6f85995379
commit
15177a529a
2 changed files with 3 additions and 3 deletions
|
|
@ -17,7 +17,7 @@ fn decapitalize(s: &str) -> String {
|
|||
|
||||
pub fn derive_impl(input: DeriveInput) -> syn::Result<TokenStream> {
|
||||
let Data::Struct(data) = input.data else {
|
||||
return Err(syn::Error::new(input.span(), "Must be a struct"));
|
||||
return util::bail(input.span(), "Must be a struct");
|
||||
};
|
||||
|
||||
let struct_ident = input.ident;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue