Impl Debug for SharedMemory and Extern (#5211)
This commit is contained in:
@@ -18,7 +18,7 @@ use wasmtime_runtime::{self as runtime, InstanceHandle};
|
|||||||
/// as well as required by [`Instance::new`](crate::Instance::new). In other
|
/// as well as required by [`Instance::new`](crate::Instance::new). In other
|
||||||
/// words, this is the type of extracted values from an instantiated module, and
|
/// words, this is the type of extracted values from an instantiated module, and
|
||||||
/// it's also used to provide imported values when instantiating a module.
|
/// it's also used to provide imported values when instantiating a module.
|
||||||
#[derive(Clone)]
|
#[derive(Clone, Debug)]
|
||||||
pub enum Extern {
|
pub enum Extern {
|
||||||
/// A WebAssembly `func` which can be called.
|
/// A WebAssembly `func` which can be called.
|
||||||
Func(Func),
|
Func(Func),
|
||||||
|
|||||||
@@ -818,6 +818,12 @@ impl SharedMemory {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl std::fmt::Debug for SharedMemory {
|
||||||
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
f.debug_struct("SharedMemory").finish_non_exhaustive()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use crate::*;
|
use crate::*;
|
||||||
|
|||||||
Reference in New Issue
Block a user