Noa
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
8 additions and
1 deletions
-
crates/wasmtime/src/store.rs
-
crates/wasmtime/src/store/context.rs
|
|
@ -980,7 +980,7 @@ impl<'a, T> StoreContext<'a, T> { |
|
|
|
/// Access the underlying data owned by this `Store`.
|
|
|
|
///
|
|
|
|
/// Same as [`Store::data`].
|
|
|
|
pub fn data(&self) -> &T { |
|
|
|
pub fn data(&self) -> &'a T { |
|
|
|
self.0.data() |
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -161,6 +161,13 @@ impl<T> AsContextMut for StoreContextMut<'_, T> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
impl<'a, T> From<StoreContextMut<'a, T>> for StoreContext<'a, T> { |
|
|
|
#[inline] |
|
|
|
fn from(store: StoreContextMut<'a, T>) -> StoreContext<'a, T> { |
|
|
|
StoreContext(store.0) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// Implementations for internal consumers, but these aren't public types so
|
|
|
|
// they're not publicly accessible for crate consumers.
|
|
|
|
impl<T> AsContext for &'_ StoreInner<T> { |
|
|
|