Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

Commit

Permalink
don't use magical numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
pwbh committed Feb 1, 2024
1 parent 50c0759 commit e673452
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nyx-storage/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ mod tests {
#[async_std::test]
#[cfg_attr(miri, ignore)]
async fn get_returns_ok() {
let message_count = 1_000_000;
let message_count = 500;
let test_message = b"messssagee";

let mut storage = setup_test_storage(&function!(), test_message, message_count).await;
Expand Down
2 changes: 1 addition & 1 deletion nyx-storage/src/offset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl Offset {
}

pub fn as_bytes(&self) -> &[u8] {
let offset = self as *const _ as *const [u8; 32];
let offset = self as *const _ as *const [u8; std::mem::size_of::<Offset>()];
unsafe { &(*offset) }
}

Expand Down

0 comments on commit e673452

Please sign in to comment.