@@ -6,7 +6,7 @@ use std::collections::hash_map::Entry;
66use std:: path:: Path ;
77
88use :: serde:: de:: { self , Deserializer , Error as _} ;
9- use :: serde:: ser:: { SerializeSeq , Serializer } ;
9+ use :: serde:: ser:: { Error as _ , SerializeSeq , Serializer } ;
1010use :: serde:: { Deserialize , Serialize } ;
1111use rustc_ast:: join_path_syms;
1212use rustc_data_structures:: fx:: { FxHashMap , FxHashSet , FxIndexMap } ;
@@ -1059,12 +1059,14 @@ impl Serialize for TypeData {
10591059 let mut buf = Vec :: new ( ) ;
10601060 encode:: write_postings_to_string ( & self . inverted_function_inputs_index , & mut buf) ;
10611061 let mut serialized_result = Vec :: new ( ) ;
1062- stringdex_internals:: encode:: write_base64_to_bytes ( & buf, & mut serialized_result) ;
1062+ stringdex_internals:: encode:: write_base64_to_bytes ( & buf, & mut serialized_result)
1063+ . map_err ( S :: Error :: custom) ?;
10631064 seq. serialize_element ( & str:: from_utf8 ( & serialized_result) . unwrap ( ) ) ?;
10641065 buf. clear ( ) ;
10651066 serialized_result. clear ( ) ;
10661067 encode:: write_postings_to_string ( & self . inverted_function_output_index , & mut buf) ;
1067- stringdex_internals:: encode:: write_base64_to_bytes ( & buf, & mut serialized_result) ;
1068+ stringdex_internals:: encode:: write_base64_to_bytes ( & buf, & mut serialized_result)
1069+ . map_err ( S :: Error :: custom) ?;
10681070 seq. serialize_element ( & str:: from_utf8 ( & serialized_result) . unwrap ( ) ) ?;
10691071 if self . search_unbox {
10701072 seq. serialize_element ( & 1 ) ?;
0 commit comments