From 6470bd59ef2b8c359a952c069ee6d6cf59d1131f Mon Sep 17 00:00:00 2001 From: Dominic Date: Thu, 17 Sep 2020 12:21:09 +0200 Subject: [PATCH] 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 --- derive/src/openapi_type.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/derive/src/openapi_type.rs b/derive/src/openapi_type.rs index 58965ba..b3f2d36 100644 --- a/derive/src/openapi_type.rs +++ b/derive/src/openapi_type.rs @@ -84,7 +84,7 @@ fn parse_attributes(input: &[Attribute]) -> Result { } fn expand_variant(variant: &Variant) -> Result { - 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"