chore: improve error span
This commit is contained in:
parent
2ca99faef3
commit
dfbd2b3457
1 changed files with 2 additions and 2 deletions
|
@ -19,13 +19,13 @@ fn derive_impl(input: syn::DeriveInput) -> syn::Result<TokenStream> {
|
|||
|
||||
if relax_attrs.is_empty() {
|
||||
return Err(syn::Error::new_spanned(
|
||||
input,
|
||||
input.ident,
|
||||
"expected #[relax(StructName)] attrubute",
|
||||
));
|
||||
}
|
||||
if relax_attrs.len() > 1 {
|
||||
return Err(syn::Error::new_spanned(
|
||||
input,
|
||||
input.ident,
|
||||
"expected only one #[relax(StructName)] attrubute on top of the struct",
|
||||
));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue