File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
float-pigment-consistent-bincode/src/ser Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -841,18 +841,18 @@ fn encode_utf8(c: char) -> EncodeUtf8 {
841841 buf[ 3 ] = code as u8 ;
842842 3
843843 } else if code < MAX_TWO_B {
844- buf[ 2 ] = ( code >> 6 & 0x1F ) as u8 | TAG_TWO_B ;
844+ buf[ 2 ] = ( ( code >> 6 ) & 0x1F ) as u8 | TAG_TWO_B ;
845845 buf[ 3 ] = ( code & 0x3F ) as u8 | TAG_CONT ;
846846 2
847847 } else if code < MAX_THREE_B {
848- buf[ 1 ] = ( code >> 12 & 0x0F ) as u8 | TAG_THREE_B ;
849- buf[ 2 ] = ( code >> 6 & 0x3F ) as u8 | TAG_CONT ;
848+ buf[ 1 ] = ( ( code >> 12 ) & 0x0F ) as u8 | TAG_THREE_B ;
849+ buf[ 2 ] = ( ( code >> 6 ) & 0x3F ) as u8 | TAG_CONT ;
850850 buf[ 3 ] = ( code & 0x3F ) as u8 | TAG_CONT ;
851851 1
852852 } else {
853- buf[ 0 ] = ( code >> 18 & 0x07 ) as u8 | TAG_FOUR_B ;
854- buf[ 1 ] = ( code >> 12 & 0x3F ) as u8 | TAG_CONT ;
855- buf[ 2 ] = ( code >> 6 & 0x3F ) as u8 | TAG_CONT ;
853+ buf[ 0 ] = ( ( code >> 18 ) & 0x07 ) as u8 | TAG_FOUR_B ;
854+ buf[ 1 ] = ( ( code >> 12 ) & 0x3F ) as u8 | TAG_CONT ;
855+ buf[ 2 ] = ( ( code >> 6 ) & 0x3F ) as u8 | TAG_CONT ;
856856 buf[ 3 ] = ( code & 0x3F ) as u8 | TAG_CONT ;
857857 0
858858 } ;
You can’t perform that action at this time.
0 commit comments