Remove unnecessary soa_index Id type alias

This commit is contained in:
Agus Zubiaga 2024-11-25 19:35:26 -03:00
parent 01892dcf20
commit c31b457428
No known key found for this signature in database
3 changed files with 9 additions and 11 deletions

View file

@ -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>,
}

View file

@ -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 }
}
}