mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-19 03:41:22 +00:00
Update with PR review suggestions
This commit is contained in:
@ -6,16 +6,22 @@ use std::any::Any;
|
|||||||
|
|
||||||
/// Aliases the standard `Result` type as `Result` within this module.
|
/// Aliases the standard `Result` type as `Result` within this module.
|
||||||
pub type Result<T> = std::result::Result<T, Error>;
|
pub type Result<T> = std::result::Result<T, Error>;
|
||||||
|
/// Result of an attempt to compile the provided WebAssembly module into a `Module`.
|
||||||
/// Aliases the standard `Result` with `CompileError` as the default error type.
|
/// Aliases the standard `Result` with `CompileError` as the default error type.
|
||||||
pub type CompileResult<T> = std::result::Result<T, CompileError>;
|
pub type CompileResult<T> = std::result::Result<T, CompileError>;
|
||||||
|
/// Result of an attempt to link the provided WebAssembly instance.
|
||||||
/// Aliases the standard `Result` with `Vec<LinkError>` as the default error type.
|
/// Aliases the standard `Result` with `Vec<LinkError>` as the default error type.
|
||||||
pub type LinkResult<T> = std::result::Result<T, Vec<LinkError>>;
|
pub type LinkResult<T> = std::result::Result<T, Vec<LinkError>>;
|
||||||
|
/// Result of an attempt to run the provided WebAssembly instance.
|
||||||
/// Aliases the standard `Result` with `RuntimeError` as the default error type.
|
/// Aliases the standard `Result` with `RuntimeError` as the default error type.
|
||||||
pub type RuntimeResult<T> = std::result::Result<T, RuntimeError>;
|
pub type RuntimeResult<T> = std::result::Result<T, RuntimeError>;
|
||||||
|
/// Result of an attempt to call the provided WebAssembly instance.
|
||||||
/// Aliases the standard `Result` with `CallError` as the default error type.
|
/// Aliases the standard `Result` with `CallError` as the default error type.
|
||||||
pub type CallResult<T> = std::result::Result<T, CallError>;
|
pub type CallResult<T> = std::result::Result<T, CallError>;
|
||||||
|
/// Result of an attempt to resolve a WebAssembly function by name.
|
||||||
/// Aliases the standard `Result` with `ResolveError` as the default error type.
|
/// Aliases the standard `Result` with `ResolveError` as the default error type.
|
||||||
pub type ResolveResult<T> = std::result::Result<T, ResolveError>;
|
pub type ResolveResult<T> = std::result::Result<T, ResolveError>;
|
||||||
|
/// Result of an attempt to parse bytes into a WebAssembly module.
|
||||||
/// Aliases the standard `Result` with `ParseError` as the default error type.
|
/// Aliases the standard `Result` with `ParseError` as the default error type.
|
||||||
pub type ParseResult<T> = std::result::Result<T, ParseError>;
|
pub type ParseResult<T> = std::result::Result<T, ParseError>;
|
||||||
|
|
||||||
|
@ -577,7 +577,7 @@ pub struct LocalTable {
|
|||||||
unsafe impl Send for LocalTable {}
|
unsafe impl Send for LocalTable {}
|
||||||
|
|
||||||
impl LocalTable {
|
impl LocalTable {
|
||||||
/// Offset base.
|
/// Offset to base.
|
||||||
#[allow(clippy::erasing_op)] // TODO
|
#[allow(clippy::erasing_op)] // TODO
|
||||||
pub fn offset_base() -> u8 {
|
pub fn offset_base() -> u8 {
|
||||||
0 * (mem::size_of::<usize>() as u8)
|
0 * (mem::size_of::<usize>() as u8)
|
||||||
|
Reference in New Issue
Block a user