From bdd285810e49ec7b4c40558debe5fa0046b1fb4e Mon Sep 17 00:00:00 2001 From: vms Date: Mon, 15 Mar 2021 13:06:39 +0300 Subject: [PATCH] add ctor for Interfaces --- wasmer-it/src/ast.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/wasmer-it/src/ast.rs b/wasmer-it/src/ast.rs index da898b7..d97e8b3 100644 --- a/wasmer-it/src/ast.rs +++ b/wasmer-it/src/ast.rs @@ -139,3 +139,16 @@ pub struct Interfaces<'input> { /// All the implementations. pub implementations: Vec, } + +impl Interfaces { + pub fn from_version(version: semver::Version) -> Self { + Self { + version, + types: Vec::new(), + imports: Vec::new(), + adapters: Vec::new(), + exports: Vec::new(), + implementations: Vec::new(), + } + } +}