Skip to content

Commit

Permalink
Fixed residual package-doc issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitSeb committed Jul 19, 2022
1 parent 06474c1 commit de384bb
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 15 deletions.
4 changes: 0 additions & 4 deletions lib/api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,6 @@
//! A Host function is any function implemented on the host, in this case in
//! Rust.
//!
//! Host functions can optionally be created with an environment that
//! implements [`WasmerEnv`]. This environment is useful for maintaining
//! host state (for example the filesystem in WASI).
//!
//! Thus WebAssembly modules by themselves cannot do anything but computation
//! on the core types in [`Value`]. In order to make them more useful we
//! give them access to the outside world with [`imports`].
Expand Down
10 changes: 5 additions & 5 deletions lib/api/src/sys/externals/global.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub struct Global {
}

impl Global {
/// Create a new `Global` with the initial value [`Val`].
/// Create a new `Global` with the initial value [`Value`].
///
/// # Example
///
Expand All @@ -36,7 +36,7 @@ impl Global {
Self::from_value(ctx, val, Mutability::Const).unwrap()
}

/// Create a mutable `Global` with the initial value [`Val`].
/// Create a mutable `Global` with the initial value [`Value`].
///
/// # Example
///
Expand All @@ -53,7 +53,7 @@ impl Global {
Self::from_value(ctx, val, Mutability::Var).unwrap()
}

/// Create a `Global` with the initial value [`Val`] and the provided [`Mutability`].
/// Create a `Global` with the initial value [`Value`] and the provided [`Mutability`].
fn from_value(
ctx: &mut impl AsStoreMut,
val: Value,
Expand Down Expand Up @@ -95,7 +95,7 @@ impl Global {
*self.handle.get(ctx.as_store_ref().objects()).ty()
}

/// Retrieves the current value [`Val`] that the Global has.
/// Retrieves the current value [`Value`] that the Global has.
///
/// # Example
///
Expand All @@ -120,7 +120,7 @@ impl Global {
}
}

/// Sets a custom value [`Val`] to the runtime Global.
/// Sets a custom value [`Value`] to the runtime Global.
///
/// # Example
///
Expand Down
6 changes: 3 additions & 3 deletions lib/api/src/sys/function_env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,19 @@ impl<T> Clone for FunctionEnv<T> {
}
}

/// A temporary handle to a [`Context`].
/// A temporary handle to a [`FunctionEnv`].
pub struct FunctionEnvMut<'a, T: 'a> {
pub(crate) store_mut: StoreMut<'a>,
pub(crate) func_env: FunctionEnv<T>,
}

impl<T: Send + 'static> FunctionEnvMut<'_, T> {
/// Returns a reference to the host state in this context.
/// Returns a reference to the host state in this function environement.
pub fn data(&self) -> &T {
self.func_env.as_ref(&self.store_mut)
}

/// Returns a mutable- reference to the host state in this context.
/// Returns a mutable- reference to the host state in this function environement.
pub fn data_mut(&mut self) -> &mut T {
self.func_env.as_mut(&mut self.store_mut)
}
Expand Down
2 changes: 1 addition & 1 deletion lib/api/src/sys/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub enum InstantiationError {
#[error("missing required CPU features: {0:?}")]
CpuFeature(String),

/// Import from a different [`Store`].
/// Import from a different Store.
/// This error occurs when an import from a different store is used.
#[error("cannot mix imports from different stores")]
DifferentStores,
Expand Down
4 changes: 2 additions & 2 deletions lib/api/src/sys/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ impl fmt::Debug for Store {
}
}

/// A temporary handle to a [`Context`].
/// A temporary handle to a [`Store`].
pub struct StoreRef<'a> {
pub(crate) inner: &'a StoreInner,
}
Expand Down Expand Up @@ -182,7 +182,7 @@ impl<'a> StoreRef<'a> {
}
}

/// A temporary handle to a [`Context`].
/// A temporary handle to a [`Store`].
pub struct StoreMut<'a> {
pub(crate) inner: &'a mut StoreInner,
}
Expand Down

0 comments on commit de384bb

Please sign in to comment.