change interfaces to use slices instead of Vec

This commit is contained in:
Nathan Froyd
2020-03-05 10:07:01 -05:00
parent 0f49a830c9
commit 2bb3096342
6 changed files with 18 additions and 18 deletions

View File

@@ -86,7 +86,7 @@ where
ctx: &Context,
namespace: &ModuleNamespace<Self>,
code_size: u32,
) -> ModuleResult<(Self::CompiledFunction, Option<&Vec<TrapSite>>)>;
) -> ModuleResult<(Self::CompiledFunction, &[TrapSite])>;
/// Define a function, taking the function body from the given `bytes`.
///
@@ -98,7 +98,7 @@ where
bytes: &[u8],
namespace: &ModuleNamespace<Self>,
traps: Vec<TrapSite>,
) -> ModuleResult<(Self::CompiledFunction, Option<&Vec<TrapSite>>)>;
) -> ModuleResult<(Self::CompiledFunction, &[TrapSite])>;
/// Define a zero-initialized data object of the given size.
///