1
0
Fork 0
mirror of https://gitlab.com/msrd0/gotham-restful.git synced 2025-02-22 20:52:27 +00:00

fix weird rust issue where PartialEq is not being detected since 1.44.0

I did not manage to get a repro of this since all old versions of rust
fail to compile, eventhough the CI clearly confirms that it used to
compile with 1.43.0
This commit is contained in:
Dominic 2020-09-17 12:21:09 +02:00
parent 31835fe57f
commit 6470bd59ef
Signed by: msrd0
GPG key ID: DCC8C247452E98F9

View file

@ -84,7 +84,7 @@ fn parse_attributes(input: &[Attribute]) -> Result<Attrs> {
}
fn expand_variant(variant: &Variant) -> Result<TokenStream> {
if variant.fields != Fields::Unit {
if !matches!(variant.fields, Fields::Unit) {
return Err(Error::new(
variant.span(),
"#[derive(OpenapiType)] does not support enum variants with fields"