mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Remove unnecessary soa_index Id type alias
This commit is contained in:
parent
01892dcf20
commit
c31b457428
3 changed files with 9 additions and 11 deletions
|
@ -1,5 +1,5 @@
|
|||
use roc_module::ident::ForeignSymbol;
|
||||
use soa::Id;
|
||||
use soa::Index;
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
pub struct ForeignSymbols {
|
||||
|
@ -26,12 +26,12 @@ impl ForeignSymbols {
|
|||
self.inner.push(entry);
|
||||
|
||||
ForeignSymbolId {
|
||||
inner: Id::new(id as u32),
|
||||
inner: Index::new(id as u32),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
||||
pub struct ForeignSymbolId {
|
||||
inner: Id<ForeignSymbol>,
|
||||
inner: Index<ForeignSymbol>,
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ use roc_can::expr::Recursive;
|
|||
use roc_module::low_level::LowLevel;
|
||||
use roc_module::symbol::Symbol;
|
||||
use roc_region::all::Region;
|
||||
use soa::{Id, Index, NonEmptySlice, Slice, Slice2, Slice3};
|
||||
use soa::{Index, NonEmptySlice, Slice, Slice2, Slice3};
|
||||
use std::iter;
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
|
@ -46,7 +46,7 @@ impl MonoExprs {
|
|||
self.regions.push(region);
|
||||
|
||||
MonoExprId {
|
||||
inner: Id::new(index),
|
||||
inner: Index::new(index),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -146,22 +146,22 @@ impl MonoExprs {
|
|||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub struct MonoExprId {
|
||||
inner: Id<MonoExpr>,
|
||||
inner: Index<MonoExpr>,
|
||||
}
|
||||
|
||||
impl MonoExprId {
|
||||
pub(crate) unsafe fn new_unchecked(inner: Id<MonoExpr>) -> Self {
|
||||
pub(crate) unsafe fn new_unchecked(inner: Index<MonoExpr>) -> Self {
|
||||
Self { inner }
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub struct MonoStmtId {
|
||||
inner: Id<MonoStmt>,
|
||||
inner: Index<MonoStmt>,
|
||||
}
|
||||
|
||||
impl MonoStmtId {
|
||||
pub(crate) unsafe fn new_unchecked(inner: Id<MonoStmt>) -> Self {
|
||||
pub(crate) unsafe fn new_unchecked(inner: Index<MonoStmt>) -> Self {
|
||||
Self { inner }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,8 +8,6 @@ use core::{
|
|||
|
||||
use crate::soa_slice::Slice;
|
||||
|
||||
pub type Id<T> = Index<T>;
|
||||
|
||||
/// An index into an array of values, based
|
||||
/// on an offset into the array rather than a pointer.
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue