File tree 2 files changed +7
-7
lines changed
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -79,18 +79,18 @@ where
79
79
let ( i, rest) = unsafe { self . inner . next ( ) . unwrap_unchecked ( ) } ;
80
80
let c = u32:: from ( rest & 0x3f ) ;
81
81
if first < 0xe0 {
82
- ( i + 1 , u32:: from ( first & 0x1f ) << 6 | c)
82
+ ( i + 1 , ( u32:: from ( first & 0x1f ) << 6 ) | c)
83
83
} else {
84
84
// 3 bytes ~
85
85
let ( i, rest) = unsafe { self . inner . next ( ) . unwrap_unchecked ( ) } ;
86
- let c = c << 6 | u32:: from ( rest & 0x3f ) ;
86
+ let c = ( c << 6 ) | u32:: from ( rest & 0x3f ) ;
87
87
if first < 0xf0 {
88
- ( i + 1 , u32:: from ( first & 0x0f ) << 12 | c)
88
+ ( i + 1 , ( u32:: from ( first & 0x0f ) << 12 ) | c)
89
89
} else {
90
90
// 4 bytes
91
91
let ( i, rest) = unsafe { self . inner . next ( ) . unwrap_unchecked ( ) } ;
92
- let c = c << 6 | u32:: from ( rest & 0x3f ) ;
93
- ( i + 1 , u32:: from ( first & 0x07 ) << 18 | c)
92
+ let c = ( c << 6 ) | u32:: from ( rest & 0x3f ) ;
93
+ ( i + 1 , ( u32:: from ( first & 0x07 ) << 18 ) | c)
94
94
}
95
95
}
96
96
} ;
Original file line number Diff line number Diff line change @@ -43,12 +43,12 @@ impl U24nU8 {
43
43
44
44
#[ inline( always) ]
45
45
pub fn set_a ( & mut self , a : U24 ) {
46
- self . 0 = a. get ( ) << 8 | u32:: from ( self . b ( ) ) ;
46
+ self . 0 = ( a. get ( ) << 8 ) | u32:: from ( self . b ( ) ) ;
47
47
}
48
48
49
49
#[ inline( always) ]
50
50
pub fn set_b ( & mut self , b : u8 ) {
51
- self . 0 = self . a ( ) . get ( ) << 8 | u32:: from ( b) ;
51
+ self . 0 = ( self . a ( ) . get ( ) << 8 ) | u32:: from ( b) ;
52
52
}
53
53
}
54
54
You can’t perform that action at this time.
0 commit comments