Skip to content

Commit 38c2ef6

Browse files
committed
Disambiguate enum deserialize.
Having a trait in scope that defines a deserialize function to common types will generate a rustc E0034 error. This change makes sure this won't happen.
1 parent a781420 commit 38c2ef6

File tree

1 file changed

+1
-1
lines changed
  • graphql_client_codegen/src/codegen

1 file changed

+1
-1
lines changed

graphql_client_codegen/src/codegen/enums.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ pub(super) fn generate_enum_definitions<'a, 'schema: 'a>(
7575

7676
impl<'de> ::serde::Deserialize<'de> for #name {
7777
fn deserialize<D: ::serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
78-
let s = <String>::deserialize(deserializer)?;
78+
let s: String = ::serde::Deserialize::deserialize(deserializer)?;
7979

8080
match s.as_str() {
8181
#(#variant_str => Ok(#constructors),)*

0 commit comments

Comments
 (0)