From c0d2d9fab1e6708533928c2d681eeab4ae72d5fd Mon Sep 17 00:00:00 2001 From: vms Date: Sun, 26 Jul 2020 23:53:09 +0300 Subject: [PATCH] add clone to type --- src/ast.rs | 4 ++-- src/interpreter/instructions/records.rs | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/ast.rs b/src/ast.rs index 9429dd0..96aed0e 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -8,7 +8,7 @@ use crate::{ use std::str; /// Represents the kind of type. -#[derive(PartialEq, Debug)] +#[derive(PartialEq, Debug, Clone)] pub enum TypeKind { /// A function type. Function, @@ -18,7 +18,7 @@ pub enum TypeKind { } /// Represents a type. -#[derive(PartialEq, Debug)] +#[derive(PartialEq, Debug, Clone)] pub enum Type { /// A function type, like: /// diff --git a/src/interpreter/instructions/records.rs b/src/interpreter/instructions/records.rs index 893861a..5b12194 100644 --- a/src/interpreter/instructions/records.rs +++ b/src/interpreter/instructions/records.rs @@ -388,8 +388,7 @@ where runtime.stack.push(InterfaceValue::I32(value_pointer)); runtime.stack.push(InterfaceValue::I32(value.len() as _)); */ - let offset = - record_lower_memory_(*instance, instruction, record_values)?; + let offset = record_lower_memory_(*instance, instruction, record_values)?; runtime.stack.push(InterfaceValue::I32(offset)); Ok(())