File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
graphql_client_codegen/src Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ impl<'schema> GqlEnum<'schema> {
62
62
let variant_str: Vec < & str > = self . variants . iter ( ) . map ( |v| v. name ) . collect ( ) ;
63
63
let variant_str = & variant_str;
64
64
65
- let name = name_ident. clone ( ) ;
65
+ let name = name_ident;
66
66
67
67
quote ! {
68
68
#derives
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ pub fn generate_module_token_stream(
104
104
hash_map:: Entry :: Occupied ( o) => o. get ( ) . clone ( ) ,
105
105
hash_map:: Entry :: Vacant ( v) => {
106
106
let schema_string = read_file ( v. key ( ) ) ?;
107
- v. insert ( schema_string) . to_string ( )
107
+ ( * v. insert ( schema_string) ) . to_string ( )
108
108
}
109
109
}
110
110
} ;
Original file line number Diff line number Diff line change @@ -75,7 +75,12 @@ pub(crate) fn union_variants<'selection>(
75
75
Some ( Ok ( Some ( tokens) ) ) => children_definitions. push ( tokens) ,
76
76
Some ( Err ( err) ) => return Err ( err) ,
77
77
Some ( Ok ( None ) ) => ( ) ,
78
- None => return Err ( UnionError :: UnknownType { ty : on. to_string ( ) } . into ( ) ) ,
78
+ None => {
79
+ return Err ( UnionError :: UnknownType {
80
+ ty : ( * on) . to_string ( ) ,
81
+ }
82
+ . into ( ) )
83
+ }
79
84
} ;
80
85
81
86
variants. push ( quote ! {
@@ -113,7 +118,7 @@ impl<'schema> GqlUnion<'schema> {
113
118
if !self . variants . contains ( used_variant) {
114
119
return Err ( UnionError :: UnknownVariant {
115
120
ty : self . name . into ( ) ,
116
- var : used_variant. to_string ( ) ,
121
+ var : ( * used_variant) . to_string ( ) ,
117
122
}
118
123
. into ( ) ) ;
119
124
}
You can’t perform that action at this time.
0 commit comments