Remove static_assertions

This commit is contained in:
Ruihan Li
2025-03-03 10:40:40 +08:00
committed by Tate, Hongliang Tian
parent 0c028a7d8c
commit 9e1c939a3f
18 changed files with 31 additions and 33 deletions

View File

@ -2,13 +2,13 @@
//! The layer of untrusted block I/O.
use static_assertions::assert_eq_size;
mod block_buf;
mod block_log;
mod block_ring;
mod block_set;
use ostd::const_assert;
pub use self::{
block_buf::{Buf, BufMut, BufRef},
block_log::{BlockLog, MemLog},
@ -20,5 +20,5 @@ pub type BlockId = usize;
pub const BLOCK_SIZE: usize = 0x1000;
pub const BID_SIZE: usize = core::mem::size_of::<BlockId>();
// This definition of BlockId assumes the target architecture is 64-bit
assert_eq_size!(usize, u64);
// This definition of `BlockId` assumes the target architecture is 64-bit.
const_assert!(BID_SIZE == 8);

View File

@ -3,9 +3,9 @@
use alloc::vec;
use core::{any::Any, mem::size_of};
use ostd::const_assert;
use ostd_pod::Pod;
use serde::{Deserialize, Serialize};
use static_assertions::const_assert;
use super::{Iv, Key, Mac};
use crate::{