Revert changes to Exportable

This commit is contained in:
Mark McCaskey
2020-06-09 13:26:12 -07:00
parent a8faa2eb9c
commit 7eb54950f1
11 changed files with 27 additions and 112 deletions

View File

@@ -51,22 +51,7 @@ impl<'a> Exportable<'a> for Extern {
}
}
fn get_self_from_extern(_extern: &'a Extern) -> Result<Self, ExportError> {
Ok(_extern.clone())
}
}
impl<'a> Exportable<'a> for &'a Extern {
fn to_export(&self) -> Export {
match self {
Extern::Function(f) => f.to_export(),
Extern::Global(g) => g.to_export(),
Extern::Memory(m) => m.to_export(),
Extern::Table(t) => t.to_export(),
}
}
fn get_self_from_extern(_extern: &'a Extern) -> Result<Self, ExportError> {
fn get_self_from_extern(_extern: &'a Extern) -> Result<&'a Self, ExportError> {
// Since this is already an extern, we can just return it.
Ok(_extern)
}