diff --git a/modules/openapi-generator/src/main/resources/rust-axum/models.mustache b/modules/openapi-generator/src/main/resources/rust-axum/models.mustache index 00b23629acb4..177ec4cd84ad 100644 --- a/modules/openapi-generator/src/main/resources/rust-axum/models.mustache +++ b/modules/openapi-generator/src/main/resources/rust-axum/models.mustache @@ -571,7 +571,7 @@ impl std::str::FromStr for {{{classname}}} { impl PartialEq for {{{classname}}} { fn eq(&self, other: &Self) -> bool { - self.0.get().eq(other.0.get()) + self.0.get() == other.0.get() } } {{/anyOf.size}} @@ -604,7 +604,7 @@ impl std::str::FromStr for {{{classname}}} { impl PartialEq for {{{classname}}} { fn eq(&self, other: &Self) -> bool { - self.0.get().eq(other.0.get()) + self.0.get() == other.0.get() } } {{/oneOf.size}} diff --git a/samples/server/petstore/rust-axum/output/openapi-v3/src/models.rs b/samples/server/petstore/rust-axum/output/openapi-v3/src/models.rs index 9c95d11a9e3d..23bea6cf2ff3 100644 --- a/samples/server/petstore/rust-axum/output/openapi-v3/src/models.rs +++ b/samples/server/petstore/rust-axum/output/openapi-v3/src/models.rs @@ -489,7 +489,7 @@ impl std::str::FromStr for AnyOfGet202Response { impl PartialEq for AnyOfGet202Response { fn eq(&self, other: &Self) -> bool { - self.0.get().eq(other.0.get()) + self.0.get() == other.0.get() } } @@ -519,7 +519,7 @@ impl std::str::FromStr for AnyOfObject { impl PartialEq for AnyOfObject { fn eq(&self, other: &Self) -> bool { - self.0.get().eq(other.0.get()) + self.0.get() == other.0.get() } } @@ -990,7 +990,7 @@ impl std::str::FromStr for Model12345AnyOfObject { impl PartialEq for Model12345AnyOfObject { fn eq(&self, other: &Self) -> bool { - self.0.get().eq(other.0.get()) + self.0.get() == other.0.get() } } @@ -2293,7 +2293,7 @@ impl std::str::FromStr for OneOfGet200Response { impl PartialEq for OneOfGet200Response { fn eq(&self, other: &Self) -> bool { - self.0.get().eq(other.0.get()) + self.0.get() == other.0.get() } }