final touchups

This commit is contained in:
Folkert 2020-09-30 22:20:58 +02:00
parent 0a2e7be885
commit a9329b250d
2 changed files with 1 additions and 5 deletions

View file

@ -5,7 +5,7 @@ authors = ["Richard Feldman <oss@rtfeldman.com>"]
repository = "https://github.com/rtfeldman/roc" repository = "https://github.com/rtfeldman/roc"
readme = "README.md" readme = "README.md"
edition = "2018" edition = "2018"
description = "Generate LLVM bitcode for Roc builtins" description = "Rust representations of Roc data structures"
license = "Apache-2.0" license = "Apache-2.0"
[dependencies] [dependencies]

View file

@ -34,17 +34,14 @@ pub enum Storage {
} }
impl<T> RocList<T> { impl<T> RocList<T> {
#[no_mangle]
pub fn len(&self) -> usize { pub fn len(&self) -> usize {
self.length self.length
} }
#[no_mangle]
pub fn is_empty(&self) -> bool { pub fn is_empty(&self) -> bool {
self.length == 0 self.length == 0
} }
#[no_mangle]
pub fn empty() -> Self { pub fn empty() -> Self {
RocList { RocList {
length: 0, length: 0,
@ -52,7 +49,6 @@ impl<T> RocList<T> {
} }
} }
#[no_mangle]
pub fn get(&self, index: usize) -> Option<&T> { pub fn get(&self, index: usize) -> Option<&T> {
if index < self.len() { if index < self.len() {
Some(unsafe { Some(unsafe {