From 1303e3cae9929cfe63bacdda02cef7f8e74e797a Mon Sep 17 00:00:00 2001 From: Jules Bertholet Date: Mon, 12 Jul 2021 18:16:58 +0200 Subject: [PATCH] Parenthesize array type --- crates/cli-support/src/descriptor.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/cli-support/src/descriptor.rs b/crates/cli-support/src/descriptor.rs index 13ca2a5211b2..d4bd2c5772d5 100644 --- a/crates/cli-support/src/descriptor.rs +++ b/crates/cli-support/src/descriptor.rs @@ -258,8 +258,9 @@ impl VectorKind { VectorKind::F64 => "Float64Array".to_string(), VectorKind::Externref => "any[]".to_string(), VectorKind::NamedExternref(ref name) => { - let mut type_str = name.clone(); - type_str.push_str("[]"); + let mut type_str = "(".to_string(); + type_str.push_str(name); + type_str.push_str(")[]"); type_str } }