Skip to content

Commit 2314e0a

Browse files
committed
chore: resolve clippy
1 parent 45121d1 commit 2314e0a

File tree

1 file changed

+6
-6
lines changed
  • float-pigment-consistent-bincode/src/ser

1 file changed

+6
-6
lines changed

float-pigment-consistent-bincode/src/ser/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff 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
};

0 commit comments

Comments
 (0)