Derive Default for Initializer in std_detect
This commit is contained in:
parent
4bfd9935f7
commit
eaa7298694
1 changed files with 3 additions and 8 deletions
|
|
@ -29,16 +29,11 @@ const fn unset_bit(x: u64, bit: u32) -> u64 {
|
|||
const CACHE_CAPACITY: u32 = 62;
|
||||
|
||||
/// This type is used to initialize the cache
|
||||
#[derive(Copy, Clone)]
|
||||
// The derived `Default` implementation will initialize the field to zero,
|
||||
// which is what we want.
|
||||
#[derive(Copy, Clone, Default)]
|
||||
pub(crate) struct Initializer(u64);
|
||||
|
||||
#[allow(clippy::use_self)]
|
||||
impl Default for Initializer {
|
||||
fn default() -> Self {
|
||||
Initializer(0)
|
||||
}
|
||||
}
|
||||
|
||||
// NOTE: the `debug_assert!` would catch that we do not add more Features than
|
||||
// the one fitting our cache.
|
||||
impl Initializer {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue