File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,9 @@ impl Date {
91
91
Self {
92
92
// Safety: `ordinal` is not zero.
93
93
value : unsafe {
94
- NonZeroI32 :: new_unchecked ( year << 10 | ( is_leap_year as i32 ) << 9 | ordinal as i32 )
94
+ NonZeroI32 :: new_unchecked (
95
+ ( year << 10 ) | ( ( is_leap_year as i32 ) << 9 ) | ordinal as i32 ,
96
+ )
95
97
} ,
96
98
}
97
99
}
@@ -325,7 +327,7 @@ impl Date {
325
327
/// This method is optimized to take advantage of the fact that the value is pre-computed upon
326
328
/// construction and stored in the bitpacked struct.
327
329
const fn is_in_leap_year ( self ) -> bool {
328
- self . value . get ( ) >> 9 & 1 == 1
330
+ ( self . value . get ( ) >> 9 ) & 1 == 1
329
331
}
330
332
331
333
/// Get the year of the date.
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ impl Month {
80
80
28
81
81
}
82
82
} else {
83
- 30 | val ^ val >> 3
83
+ 30 | val ^ ( val >> 3 )
84
84
}
85
85
}
86
86
You can’t perform that action at this time.
0 commit comments