mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
Constrain with Types SoA, sans borrow checker
This commit is contained in:
parent
e3ef9828c7
commit
59d2de5a55
7 changed files with 710 additions and 328 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue