diff options
| author | Henry Gressmann <mail@henrygressmann.de> | 2024-01-05 18:32:02 +0100 |
|---|---|---|
| committer | Henry Gressmann <mail@henrygressmann.de> | 2024-01-05 18:32:02 +0100 |
| commit | 9f82dd9e0feb77624557d2fbb13255ccd25c0ea9 (patch) | |
| tree | 785aa86fd4c447f237e8edd3a4f9277dce18af02 /crates/types | |
| parent | 34dedd5989348bde863da93c19dbea4102a1d3ca (diff) | |
chore: improve global testing
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
Diffstat (limited to 'crates/types')
| -rw-r--r-- | crates/types/src/lib.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/types/src/lib.rs b/crates/types/src/lib.rs index ad82bd4..4895418 100644 --- a/crates/types/src/lib.rs +++ b/crates/types/src/lib.rs @@ -245,6 +245,12 @@ pub enum ValType { ExternRef, } +impl ValType { + pub fn default_value(&self) -> WasmValue { + WasmValue::default_for(*self) + } +} + /// A WebAssembly External Kind. /// /// See <https://webassembly.github.io/spec/core/syntax/types.html#external-types> |
