mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-18 08:06:32 +00:00
@ -2,6 +2,7 @@
|
||||
#![feature(core_intrinsics)]
|
||||
#![allow(incomplete_features)] // for const generics
|
||||
#![feature(generic_const_exprs)]
|
||||
#![allow(internal_features)]
|
||||
#![allow(clippy::needless_return)]
|
||||
|
||||
#[macro_use]
|
||||
|
@ -14,6 +14,15 @@ where
|
||||
core: BitMapCore<usize>,
|
||||
}
|
||||
|
||||
impl<const N: usize> Default for StaticBitmap<N>
|
||||
where
|
||||
[(); (N + usize::BITS as usize - 1) / (usize::BITS as usize)]:,
|
||||
{
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl<const N: usize> StaticBitmap<N>
|
||||
where
|
||||
[(); (N + usize::BITS as usize - 1) / (usize::BITS as usize)]:,
|
||||
|
@ -182,11 +182,6 @@ macro_rules! bitops_for {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
fn to_hex(bits: &Self) -> String {
|
||||
format!("{:x}", bits)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn bit_size() -> usize {
|
||||
<$target>::BITS as usize
|
||||
|
Reference in New Issue
Block a user