diff options
| author | Mica White <botahamec@outlook.com> | 2026-09-09 09:47:15 -0400 |
|---|---|---|
| committer | Mica White <botahamec@outlook.com> | 2026-09-09 09:47:15 -0400 |
| commit | 2cebe160fd72a08485f5709788d0e5c8f275d17a (patch) | |
| tree | 5bd9721fcb7525cbf44e307c37ba27d66a56fdd0 /crates/cli/src/output.rs | |
| parent | 5ab4339c98179958b11b716b5887ecd3224666e2 (diff) | |
| parent | b6a6cefd5bd8e2e488b03024c18de3cd576d3046 (diff) | |
Merge
Diffstat (limited to 'crates/cli/src/output.rs')
| -rw-r--r-- | crates/cli/src/output.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/cli/src/output.rs b/crates/cli/src/output.rs index bf568ed..40a271e 100644 --- a/crates/cli/src/output.rs +++ b/crates/cli/src/output.rs @@ -30,8 +30,9 @@ pub fn format_wasm_type(ty: WasmType) -> &'static str { WasmType::F32 => "f32", WasmType::F64 => "f64", WasmType::V128 => "v128", - WasmType::RefFunc => "funcref", - WasmType::RefExtern => "externref", + WasmType::Ref(ty) if ty.is_func() => "funcref", + WasmType::Ref(ty) if ty.is_extern() => "externref", + WasmType::Ref(_) => "ref", } } @@ -62,7 +63,7 @@ pub fn format_table_type(ty: &TableType) -> String { MemoryArch::I64 => "i64", }; let max = ty.size_max.map(|v| v.to_string()).unwrap_or_else(|| "unbounded".to_string()); - format!("table[{arch} {}] initial={} max={max}", format_wasm_type(ty.element_type), ty.size_initial) + format!("table[{arch} {}] initial={} max={max}", format_wasm_type(WasmType::Ref(ty.element_type)), ty.size_initial) } pub fn format_global_type(ty: &GlobalType) -> String { |
