mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
fix unreported clippy warnings
This commit is contained in:
parent
7ea268a5d1
commit
ed3e1ad356
1 changed files with 2 additions and 4 deletions
|
@ -51,17 +51,15 @@ impl<T> RocList<T> {
|
|||
pub fn get(&self, index: usize) -> Option<&T> {
|
||||
if index < self.len() {
|
||||
Some(unsafe {
|
||||
let raw = self.elements.offset(index as isize);
|
||||
let reference = core::mem::transmute::<*mut T, &T>(raw);
|
||||
let raw = self.elements.add(index);
|
||||
|
||||
reference
|
||||
&*raw
|
||||
})
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
//#[no_mangle]
|
||||
pub fn storage(&self) -> Option<Storage> {
|
||||
use core::cmp::Ordering::*;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue