mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
cleanup
This commit is contained in:
parent
a4d59ae0e7
commit
cda90d987c
8 changed files with 25 additions and 45 deletions
|
@ -33,7 +33,7 @@ pub fn index_of<T: ::std::fmt::Debug + std::cmp::Eq>(elt: T, slice: &[T]) -> Uti
|
|||
Ok(index)
|
||||
}
|
||||
|
||||
// replace slice method that return Option with one that return Result and proper Error
|
||||
// replaces slice method that return Option with one that return Result and proper Error
|
||||
pub fn slice_get<T>(index: usize, slice: &[T]) -> UtilResult<&<usize as SliceIndex<[T]>>::Output> {
|
||||
let elt_ref = slice.get(index).context(OutOfBounds {
|
||||
index,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue