From ee869abc8f7383b198f2033f940fdd5aa8839fed Mon Sep 17 00:00:00 2001 From: Henry Gressmann Date: Sun, 17 Dec 2023 23:38:13 +0100 Subject: chore: improve label handling Signed-off-by: Henry Gressmann --- crates/types/src/lib.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'crates/types/src') diff --git a/crates/types/src/lib.rs b/crates/types/src/lib.rs index 4defb23..b7bf623 100644 --- a/crates/types/src/lib.rs +++ b/crates/types/src/lib.rs @@ -265,6 +265,16 @@ pub struct FuncType { pub results: Box<[ValType]>, } +impl FuncType { + /// Get the number of parameters of a function type. + pub fn empty() -> Self { + Self { + params: Box::new([]), + results: Box::new([]), + } + } +} + /// A WebAssembly Function #[derive(Debug, Clone)] pub struct Function { -- cgit v1.3.1