Skip to content

Commit

Permalink
fix(prost-derive): improve enum_type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mzabaluev committed Nov 17, 2024
1 parent d83a32b commit 0f7cbc8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions prost-derive/src/field/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ impl EnumType {
_ => {}
}
}
bail!("invalid value of enum_type attribute: {:?}", lit);
bail!("invalid value of enum_type attribute: {}", quote!(#lit));
}
Meta::List(meta_list) => {
let ident = meta_list.parse_args::<Ident>()?;
Expand All @@ -265,11 +265,11 @@ impl EnumType {
} else if ident == "closed" {
Ok(Some(EnumType::Closed))
} else {
bail!("invalid content of enum_type attribute: {:?}", ident);
bail!("invalid content of enum_type attribute: {}", ident);
}
}
_ => {
bail!("invalid enum_type attribute: {:?}", attr);
bail!("invalid enum_type attribute: {}", quote!(#attr));
}
}
}
Expand Down

0 comments on commit 0f7cbc8

Please sign in to comment.