@@ -393,11 +393,11 @@ impl CodeGenerator for ShopifyFunctionCodeGenerator {
393
393
impl shopify_function:: wasm_api:: Deserialize for #name_ident {
394
394
fn deserialize( value: & shopify_function:: wasm_api:: Value ) -> :: std:: result:: Result <Self , shopify_function:: wasm_api:: read:: Error > {
395
395
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) ?;
397
397
398
398
match typename_str. as_str( ) {
399
399
#( #match_arms) *
400
- _ => Ok ( Self :: Other ) ,
400
+ _ => :: std :: result :: Result :: Ok ( Self :: Other ) ,
401
401
}
402
402
}
403
403
}
@@ -445,7 +445,7 @@ impl CodeGenerator for ShopifyFunctionCodeGenerator {
445
445
}
446
446
}
447
447
448
- fn as_str( & self ) -> & str {
448
+ fn as_str( & self ) -> & :: std :: primitive :: str {
449
449
match self {
450
450
#( #as_str_match_arms) *
451
451
Self :: Other => panic!( "Cannot serialize `Other` variant" ) ,
@@ -466,9 +466,9 @@ impl CodeGenerator for ShopifyFunctionCodeGenerator {
466
466
let deserialize_impl = parse_quote ! {
467
467
impl shopify_function:: wasm_api:: Deserialize for #name_ident {
468
468
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) ?;
470
470
471
- Ok ( Self :: from_str( & str_value) )
471
+ :: std :: result :: Result :: Ok ( Self :: from_str( & str_value) )
472
472
}
473
473
}
474
474
} ;
@@ -521,7 +521,7 @@ impl CodeGenerator for ShopifyFunctionCodeGenerator {
521
521
context. write_object(
522
522
|context| {
523
523
#( #field_statements) *
524
- Ok ( ( ) )
524
+ :: std :: result :: Result :: Ok ( ( ) )
525
525
} ,
526
526
#num_fields,
527
527
)
@@ -542,7 +542,7 @@ impl CodeGenerator for ShopifyFunctionCodeGenerator {
542
542
let deserialize_impl = parse_quote ! {
543
543
impl shopify_function:: wasm_api:: Deserialize for #name_ident {
544
544
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 {
546
546
#( #field_values) , *
547
547
} )
548
548
}
@@ -581,7 +581,7 @@ impl CodeGenerator for ShopifyFunctionCodeGenerator {
581
581
match self {
582
582
#( #match_arms) *
583
583
}
584
- Ok ( ( ) )
584
+ :: std :: result :: Result :: Ok ( ( ) )
585
585
} , 1 )
586
586
}
587
587
}
@@ -597,7 +597,7 @@ impl CodeGenerator for ShopifyFunctionCodeGenerator {
597
597
parse_quote ! {
598
598
#field_name_lit_str => {
599
599
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) )
601
601
}
602
602
}
603
603
} )
@@ -606,22 +606,22 @@ impl CodeGenerator for ShopifyFunctionCodeGenerator {
606
606
let deserialize_impl = parse_quote ! {
607
607
impl shopify_function:: wasm_api:: Deserialize for #name_ident {
608
608
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 ) ;
611
611
} ;
612
612
613
613
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 ) ;
615
615
}
616
616
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 ) ;
619
619
} ;
620
620
let field_value = value. get_at_index( 0 ) ;
621
621
622
622
match field_name. as_str( ) {
623
623
#( #deserialize_match_arms) *
624
- _ => Err ( shopify_function:: wasm_api:: read:: Error :: InvalidType ) ,
624
+ _ => :: std :: result :: Result :: Err ( shopify_function:: wasm_api:: read:: Error :: InvalidType ) ,
625
625
}
626
626
}
627
627
}
@@ -634,21 +634,27 @@ impl CodeGenerator for ShopifyFunctionCodeGenerator {
634
634
& self ,
635
635
_enum_type_definition : & impl EnumTypeDefinition ,
636
636
) -> 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
+ ]
638
640
}
639
641
640
642
fn attributes_for_input_object (
641
643
& self ,
642
644
_input_object_type_definition : & impl InputObjectTypeDefinition ,
643
645
) -> 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
+ ]
645
649
}
646
650
647
651
fn attributes_for_one_of_input_object (
648
652
& self ,
649
653
_input_object_type_definition : & impl InputObjectTypeDefinition ,
650
654
) -> 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
+ ]
652
658
}
653
659
}
654
660
@@ -761,7 +767,7 @@ fn derive_deserialize_for_derive_input(input: &syn::DeriveInput) -> syn::Result<
761
767
let deserialize_impl = parse_quote ! {
762
768
impl shopify_function:: wasm_api:: Deserialize for #name_ident {
763
769
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 {
765
771
#( #field_values) , *
766
772
} )
767
773
}
0 commit comments