@@ -112,7 +112,10 @@ const PENTAGON_ROTATIONS: [[u8; 7]; 7] = [
112
112
/// due to failure cases. It's possible this could be restricted to a narrower
113
113
/// set of a failure cases. Currently, the logic is any unfolding across more
114
114
/// than one icosahedron face is not permitted.
115
- #[ allow( clippy:: unusual_byte_groupings) ] // Grouping by 7 is more explicit here.
115
+ #[ allow(
116
+ clippy:: unusual_byte_groupings,
117
+ reason = "grouping by 7 is more explicit here"
118
+ ) ]
116
119
const FAILED_DIRECTIONS : u64 =
117
120
// 6 5 4 3 2 1 0
118
121
0b0101000_1000100_0001100_1010000_0110000_0000000_0000000 ;
@@ -454,7 +457,7 @@ impl CellIndex {
454
457
// In this case, `mut-let-if` is faster than the idiomatic `let-if-else`.
455
458
// Actually 12.5% faster for hexagons and 3.5% slower for pentagons.
456
459
// Given that hexagons are way more common than pentagons, worth it.
457
- #[ allow( clippy:: useless_let_if_seq) ]
460
+ #[ allow( clippy:: useless_let_if_seq, reason = "12.5% faster" ) ]
458
461
pub fn children_count ( self , resolution : Resolution ) -> u64 {
459
462
let resolution = usize:: from ( resolution) ;
460
463
let curr_resolution = usize:: from ( bits:: get_resolution ( self . 0 . get ( ) ) ) ;
@@ -570,7 +573,10 @@ impl CellIndex {
570
573
mut position : u64 ,
571
574
resolution : Resolution ,
572
575
) -> Option < Self > {
573
- #[ allow( clippy:: cast_possible_truncation) ] // Safe thx to assert.
576
+ #[ allow(
577
+ clippy:: cast_possible_truncation,
578
+ reason = "safe thx to assert"
579
+ ) ]
574
580
fn set_direction ( bits : u64 , digit : u64 , resolution : Resolution ) -> u64 {
575
581
assert ! ( digit < 7 ) ;
576
582
bits:: set_direction ( bits, digit as u8 , resolution)
@@ -1947,7 +1953,7 @@ impl<'a> arbitrary::Arbitrary<'a> for CellIndex {
1947
1953
/// Checks if there is at least one unused direction in the given directions.
1948
1954
#[ inline( always) ]
1949
1955
#[ rustfmt:: skip] // Keep constants aligned for readability.
1950
- #[ allow( clippy:: unusual_byte_groupings) ] // Grouping by 3-bit is better here.
1956
+ #[ allow( clippy:: unusual_byte_groupings, reason = "grouping by 3-bit is better here" ) ]
1951
1957
const fn has_unused_direction ( dirs : u64 ) -> bool {
1952
1958
// Unused directions are represented by `0b111`, so we actually want to
1953
1959
// check the absence of this pattern.
0 commit comments