mirror of
https://github.com/fluencelabs/parity-wasm
synced 2025-07-31 06:11:58 +00:00
Clean
This commit is contained in:
@@ -20,7 +20,9 @@ pub struct TypeId(u32);
|
||||
|
||||
impl TypeId {
|
||||
pub fn resolve<'s>(&self, store: &'s Store) -> &'s FunctionType {
|
||||
store.resolve_type(*self)
|
||||
store.types
|
||||
.get(self.0 as usize)
|
||||
.expect("ID should always be a valid index")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,12 +223,6 @@ impl Store {
|
||||
.expect("ID should always be a valid index")
|
||||
}
|
||||
|
||||
fn resolve_type(&self, id: TypeId) -> &FunctionType {
|
||||
self.types
|
||||
.get(id.0 as usize)
|
||||
.expect("ID should always be a valid index")
|
||||
}
|
||||
|
||||
pub fn alloc_func_type(&mut self, func_type: FunctionType) -> TypeId {
|
||||
self.types.push(func_type);
|
||||
let type_id = self.types.len() - 1;
|
||||
|
Reference in New Issue
Block a user