diff options
| author | Henry Gressmann <mail@henrygressmann.de> | 2023-12-17 23:38:13 +0100 |
|---|---|---|
| committer | Henry Gressmann <mail@henrygressmann.de> | 2023-12-17 23:38:13 +0100 |
| commit | ee869abc8f7383b198f2033f940fdd5aa8839fed (patch) | |
| tree | a411c033eebe6d65708f699178d20ffa58c45a7b /crates/types | |
| parent | fc97f2cab27658b81ef9409b3f388226a4745cee (diff) | |
chore: improve label handling
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
Diffstat (limited to 'crates/types')
| -rw-r--r-- | crates/types/src/lib.rs | 10 |
1 files changed, 10 insertions, 0 deletions
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 { |
