@@ -393,11 +393,11 @@ impl CodeGenerator for ShopifyFunctionCodeGenerator {
393393 impl shopify_function:: wasm_api:: Deserialize for #name_ident {
394394 fn deserialize( value: & shopify_function:: wasm_api:: Value ) -> :: std:: result:: Result <Self , shopify_function:: wasm_api:: read:: Error > {
395395 let typename = value. get_obj_prop( "__typename" ) ;
396- let typename_str: String = shopify_function:: wasm_api:: Deserialize :: deserialize( & typename) ?;
396+ let typename_str: :: std :: string :: String = shopify_function:: wasm_api:: Deserialize :: deserialize( & typename) ?;
397397
398398 match typename_str. as_str( ) {
399399 #( #match_arms) *
400- _ => Ok ( Self :: Other ) ,
400+ _ => :: std :: result :: Result :: Ok ( Self :: Other ) ,
401401 }
402402 }
403403 }
@@ -445,7 +445,7 @@ impl CodeGenerator for ShopifyFunctionCodeGenerator {
445445 }
446446 }
447447
448- fn as_str( & self ) -> & str {
448+ fn as_str( & self ) -> & :: std :: primitive :: str {
449449 match self {
450450 #( #as_str_match_arms) *
451451 Self :: Other => panic!( "Cannot serialize `Other` variant" ) ,
@@ -466,9 +466,9 @@ impl CodeGenerator for ShopifyFunctionCodeGenerator {
466466 let deserialize_impl = parse_quote ! {
467467 impl shopify_function:: wasm_api:: Deserialize for #name_ident {
468468 fn deserialize( value: & shopify_function:: wasm_api:: Value ) -> :: std:: result:: Result <Self , shopify_function:: wasm_api:: read:: Error > {
469- let str_value: String = shopify_function:: wasm_api:: Deserialize :: deserialize( value) ?;
469+ let str_value: :: std :: string :: String = shopify_function:: wasm_api:: Deserialize :: deserialize( value) ?;
470470
471- Ok ( Self :: from_str( & str_value) )
471+ :: std :: result :: Result :: Ok ( Self :: from_str( & str_value) )
472472 }
473473 }
474474 } ;
@@ -521,7 +521,7 @@ impl CodeGenerator for ShopifyFunctionCodeGenerator {
521521 context. write_object(
522522 |context| {
523523 #( #field_statements) *
524- Ok ( ( ) )
524+ :: std :: result :: Result :: Ok ( ( ) )
525525 } ,
526526 #num_fields,
527527 )
@@ -542,7 +542,7 @@ impl CodeGenerator for ShopifyFunctionCodeGenerator {
542542 let deserialize_impl = parse_quote ! {
543543 impl shopify_function:: wasm_api:: Deserialize for #name_ident {
544544 fn deserialize( value: & shopify_function:: wasm_api:: Value ) -> :: std:: result:: Result <Self , shopify_function:: wasm_api:: read:: Error > {
545- Ok ( Self {
545+ :: std :: result :: Result :: Ok ( Self {
546546 #( #field_values) , *
547547 } )
548548 }
@@ -581,7 +581,7 @@ impl CodeGenerator for ShopifyFunctionCodeGenerator {
581581 match self {
582582 #( #match_arms) *
583583 }
584- Ok ( ( ) )
584+ :: std :: result :: Result :: Ok ( ( ) )
585585 } , 1 )
586586 }
587587 }
@@ -597,7 +597,7 @@ impl CodeGenerator for ShopifyFunctionCodeGenerator {
597597 parse_quote ! {
598598 #field_name_lit_str => {
599599 let value = shopify_function:: wasm_api:: Deserialize :: deserialize( & field_value) ?;
600- Ok ( Self :: #variant_ident( value) )
600+ :: std :: result :: Result :: Ok ( Self :: #variant_ident( value) )
601601 }
602602 }
603603 } )
@@ -606,22 +606,22 @@ impl CodeGenerator for ShopifyFunctionCodeGenerator {
606606 let deserialize_impl = parse_quote ! {
607607 impl shopify_function:: wasm_api:: Deserialize for #name_ident {
608608 fn deserialize( value: & shopify_function:: wasm_api:: Value ) -> :: std:: result:: Result <Self , shopify_function:: wasm_api:: read:: Error > {
609- let Some ( obj_len) = value. obj_len( ) else {
610- return Err ( shopify_function:: wasm_api:: read:: Error :: InvalidType ) ;
609+ let :: std :: option :: Option :: Some ( obj_len) = value. obj_len( ) else {
610+ return :: std :: result :: Result :: Err ( shopify_function:: wasm_api:: read:: Error :: InvalidType ) ;
611611 } ;
612612
613613 if obj_len != 1 {
614- return Err ( shopify_function:: wasm_api:: read:: Error :: InvalidType ) ;
614+ return :: std :: result :: Result :: Err ( shopify_function:: wasm_api:: read:: Error :: InvalidType ) ;
615615 }
616616
617- let Some ( field_name) = value. get_obj_key_at_index( 0 ) else {
618- return Err ( shopify_function:: wasm_api:: read:: Error :: InvalidType ) ;
617+ let :: std :: option :: Option :: Some ( field_name) = value. get_obj_key_at_index( 0 ) else {
618+ return :: std :: result :: Result :: Err ( shopify_function:: wasm_api:: read:: Error :: InvalidType ) ;
619619 } ;
620620 let field_value = value. get_at_index( 0 ) ;
621621
622622 match field_name. as_str( ) {
623623 #( #deserialize_match_arms) *
624- _ => Err ( shopify_function:: wasm_api:: read:: Error :: InvalidType ) ,
624+ _ => :: std :: result :: Result :: Err ( shopify_function:: wasm_api:: read:: Error :: InvalidType ) ,
625625 }
626626 }
627627 }
@@ -634,21 +634,27 @@ impl CodeGenerator for ShopifyFunctionCodeGenerator {
634634 & self ,
635635 _enum_type_definition : & impl EnumTypeDefinition ,
636636 ) -> Vec < syn:: Attribute > {
637- vec ! [ parse_quote! { #[ derive( Debug , PartialEq , Clone , Copy ) ] } ]
637+ vec ! [
638+ parse_quote! { #[ derive( :: std:: fmt:: Debug , :: std:: cmp:: PartialEq , :: std:: clone:: Clone , :: std:: marker:: Copy ) ] } ,
639+ ]
638640 }
639641
640642 fn attributes_for_input_object (
641643 & self ,
642644 _input_object_type_definition : & impl InputObjectTypeDefinition ,
643645 ) -> Vec < syn:: Attribute > {
644- vec ! [ parse_quote! { #[ derive( Debug , PartialEq , Clone ) ] } ]
646+ vec ! [
647+ parse_quote! { #[ derive( :: std:: fmt:: Debug , :: std:: cmp:: PartialEq , :: std:: clone:: Clone ) ] } ,
648+ ]
645649 }
646650
647651 fn attributes_for_one_of_input_object (
648652 & self ,
649653 _input_object_type_definition : & impl InputObjectTypeDefinition ,
650654 ) -> Vec < syn:: Attribute > {
651- vec ! [ parse_quote! { #[ derive( Debug , PartialEq , Clone ) ] } ]
655+ vec ! [
656+ parse_quote! { #[ derive( :: std:: fmt:: Debug , :: std:: cmp:: PartialEq , :: std:: clone:: Clone ) ] } ,
657+ ]
652658 }
653659}
654660
@@ -761,7 +767,7 @@ fn derive_deserialize_for_derive_input(input: &syn::DeriveInput) -> syn::Result<
761767 let deserialize_impl = parse_quote ! {
762768 impl shopify_function:: wasm_api:: Deserialize for #name_ident {
763769 fn deserialize( value: & shopify_function:: wasm_api:: Value ) -> :: std:: result:: Result <Self , shopify_function:: wasm_api:: read:: Error > {
764- Ok ( Self {
770+ :: std :: result :: Result :: Ok ( Self {
765771 #( #field_values) , *
766772 } )
767773 }
0 commit comments