Combine VisibleTranslationState and TranslationState (#1076)
`VisibleTranslationState` was a wrapper around a `TranslationState` that was meant to public API consumers outside of this crate. However, the internal `TranslationState` and all its methods were still publicly exposed! This commit simplifies and remedies the situation by combining them into a single `TranslationState` type. Most of its methods are only `pub(crate)` now, not visible to the entire world. The only methods that are `pub` are the ones that `VisibleTranslationState` exposed.
This commit is contained in:
committed by
Sean Stangl
parent
46ab1b4103
commit
8c3072c774
@@ -6,7 +6,7 @@
|
||||
//!
|
||||
//! [Wasmtime]: https://github.com/CraneStation/wasmtime
|
||||
|
||||
use crate::state::VisibleTranslationState;
|
||||
use crate::state::TranslationState;
|
||||
use crate::translation_utils::{
|
||||
FuncIndex, Global, GlobalIndex, Memory, MemoryIndex, SignatureIndex, Table, TableIndex,
|
||||
};
|
||||
@@ -281,7 +281,7 @@ pub trait FuncEnvironment {
|
||||
&mut self,
|
||||
_op: &Operator,
|
||||
_builder: &mut FunctionBuilder,
|
||||
_state: &VisibleTranslationState,
|
||||
_state: &TranslationState,
|
||||
) -> WasmResult<()> {
|
||||
Ok(())
|
||||
}
|
||||
@@ -292,7 +292,7 @@ pub trait FuncEnvironment {
|
||||
&mut self,
|
||||
_op: &Operator,
|
||||
_builder: &mut FunctionBuilder,
|
||||
_state: &VisibleTranslationState,
|
||||
_state: &TranslationState,
|
||||
) -> WasmResult<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user