zeroed trait
This commit is contained in:
@@ -45,3 +45,8 @@ pub fn distance(p1: impl As<usize>, p2: impl As<usize>) -> usize {
|
||||
Ordering::Equal => 0,
|
||||
}
|
||||
}
|
||||
|
||||
pub trait Zeroed: Sized {
|
||||
#[inline(always)]
|
||||
fn zeroed() -> Self { unsafe { core::mem::zeroed() } }
|
||||
}
|
||||
@@ -38,6 +38,7 @@ pub mod prelude {
|
||||
slicify_mut,
|
||||
statify,
|
||||
statify_mut,
|
||||
Zeroed
|
||||
};
|
||||
pub use crate::arrays::{
|
||||
fill_with,
|
||||
|
||||
Reference in New Issue
Block a user