Replace placeholder error message
This commit is contained in:
parent
5d58a4d3f0
commit
497333e91b
1 changed files with 6 additions and 1 deletions
|
@ -76,7 +76,12 @@ pub fn expr_for_repr(cont: &Container) -> Result<SchemaExpr, syn::Error> {
|
|||
|
||||
let variants = match &cont.data {
|
||||
Data::Enum(variants) => variants,
|
||||
_ => return Err(syn::Error::new(Span::call_site(), "oh no!")),
|
||||
_ => {
|
||||
return Err(syn::Error::new(
|
||||
Span::call_site(),
|
||||
"JsonSchema_repr can only be used on enums",
|
||||
))
|
||||
}
|
||||
};
|
||||
|
||||
if let Some(non_unit_error) = variants.iter().find_map(|v| match v.style {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue