feat(interface-types) InterfaceValue::Record now takes a Vec1.

It matches the definition of `InterfaceType::Record`.
This commit is contained in:
Ivan Enderlin
2020-04-09 12:10:48 +02:00
parent 81bb278b4c
commit c79669c4d1
8 changed files with 77 additions and 54 deletions

View File

@@ -1,6 +1,6 @@
use wasmer_interface_types::{
ast::*, decoders::binary::parse, encoders::binary::ToBytes, interpreter::Instruction, types::*,
vec1::Vec1,
vec1,
};
/// Tests an AST to binary, then binary to AST roundtrip.
@@ -17,7 +17,7 @@ fn test_binary_encoding_decoding_roundtrip() {
outputs: vec![InterfaceType::S32],
},
Type::Record(RecordType {
fields: Vec1::new(vec![InterfaceType::String, InterfaceType::I32]).unwrap(),
fields: vec1![InterfaceType::String, InterfaceType::I32],
}),
],
imports: vec![Import {