Skip to content

Commit

Permalink
fix: fix an obviously incorrect level mask check
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexagon committed Oct 12, 2024
1 parent 70068b0 commit 8a2410b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cell/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,7 @@ impl LevelMask {

/// Returns whether the specified level is included into the mask.
pub const fn contains(self, level: u8) -> bool {
level == 0 || self.0 & LevelMask::from_level(level).0 != 0
level == 0 || self.0 & (1 << (level - 1)) != 0
}

/// Creates a new mask, shifted by the offset.
Expand Down

0 comments on commit 8a2410b

Please sign in to comment.