mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
final touchups
This commit is contained in:
parent
0a2e7be885
commit
a9329b250d
2 changed files with 1 additions and 5 deletions
|
@ -34,17 +34,14 @@ pub enum Storage {
|
|||
}
|
||||
|
||||
impl<T> RocList<T> {
|
||||
#[no_mangle]
|
||||
pub fn len(&self) -> usize {
|
||||
self.length
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.length == 0
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub fn empty() -> Self {
|
||||
RocList {
|
||||
length: 0,
|
||||
|
@ -52,7 +49,6 @@ impl<T> RocList<T> {
|
|||
}
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub fn get(&self, index: usize) -> Option<&T> {
|
||||
if index < self.len() {
|
||||
Some(unsafe {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue