Constrain with Types SoA, sans borrow checker

This commit is contained in:
Ayaz Hafiz 2022-11-08 16:32:25 -06:00
parent e3ef9828c7
commit 59d2de5a55
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
7 changed files with 710 additions and 328 deletions

View file

@ -88,15 +88,15 @@ impl<T> std::fmt::Debug for Slice<T> {
impl<T> Default for Slice<T> {
fn default() -> Self {
Self {
start: Default::default(),
length: Default::default(),
_marker: Default::default(),
}
Self::empty()
}
}
impl<T> Slice<T> {
pub const fn empty() -> Self {
Self::new(0, 0)
}
pub const fn new(start: u32, length: u16) -> Self {
Self {
start,