File tree Expand file tree Collapse file tree 1 file changed +4
-28
lines changed
src/uucore/src/lib/features Expand file tree Collapse file tree 1 file changed +4
-28
lines changed Original file line number Diff line number Diff line change @@ -552,36 +552,12 @@ impl SupportsFastDecodeAndEncode for Base32Wrapper {
552552 self . inner . valid_decoding_multiple ( )
553553 }
554554
555- fn pad_remainder ( & self , remainder : & [ u8 ] ) -> Option < PadResult > {
556- if remainder. is_empty ( ) || remainder. contains ( & b'=' ) {
557- return None ;
558- }
559-
560- const VALID_REMAINDERS : [ usize ; 4 ] = [ 2 , 4 , 5 , 7 ] ;
561-
562- let mut len = remainder. len ( ) ;
563- let mut trimmed = false ;
564-
565- while len > 0 && !VALID_REMAINDERS . contains ( & len) {
566- len -= 1 ;
567- trimmed = true ;
568- }
569-
570- if len == 0 {
571- return None ;
572- }
573-
574- let mut padded = remainder[ ..len] . to_vec ( ) ;
575- let missing = self . valid_decoding_multiple ( ) - padded. len ( ) ;
576- padded. extend ( std:: iter:: repeat_n ( b'=' , missing) ) ;
577-
578- Some ( PadResult {
579- chunk : padded,
580- had_invalid_tail : trimmed,
581- } )
555+ fn should_buffer_decoding ( & self ) -> bool {
556+ true
582557 }
583558
584- fn supports_partial_decode ( & self ) -> bool {
559+ fn should_buffer_encoding ( & self ) -> bool {
585560 true
586561 }
562+
587563}
You can’t perform that action at this time.
0 commit comments