Skip to content

Commit

Permalink
Fixing BITS usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
ecton committed May 16, 2023
1 parent 11d6b80 commit 09c69d2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/bonsaidb-core/src/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2511,11 +2511,10 @@ fn primitive_key_encoding_tests() -> anyhow::Result<()> {
}

#[test]
// #[allow(clippy::cognitive_complexity)] // I disagree - @ecton
fn nonzero_key_encoding_tests() -> anyhow::Result<()> {
macro_rules! test_nonzero {
($nonzero:ident, $inner:ident) => {
let zero_bytes = [0; ($nonzero::BITS / 8) as usize];
let zero_bytes = [0; ($inner::BITS / 8) as usize];
assert!(matches!(
$nonzero::from_ord_bytes(ByteSource::Borrowed(&zero_bytes)),
Err(NonZeroKeyError::ValueIsZero)
Expand Down

0 comments on commit 09c69d2

Please sign in to comment.