From 6d42a84ba4e937b25f96c41e2feba159721af4d5 Mon Sep 17 00:00:00 2001 From: vms Date: Sat, 25 Jul 2020 11:07:20 +0300 Subject: [PATCH] use into_vc instead of public member --- src/interpreter/instructions/records.rs | 4 ++-- src/vec1.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/interpreter/instructions/records.rs b/src/interpreter/instructions/records.rs index 6e85359..b0017ee 100644 --- a/src/interpreter/instructions/records.rs +++ b/src/interpreter/instructions/records.rs @@ -129,7 +129,7 @@ where safe_transmute::transmute_many::(&data).unwrap(); let mut field_id = 0; - for field in record_type.fields.0 { + for field in record_type.fields.into_vec() { let value = data[field_id]; match field { InterfaceType::S8 => { @@ -292,7 +292,7 @@ where { let mut result: Vec = Vec::with_capacity(values.len()); - for value in values.0 { + for value in values.into_vec() { match value { InterfaceValue::S8(value) => result.push(value as _), InterfaceValue::S16(value) => result.push(value as _), diff --git a/src/vec1.rs b/src/vec1.rs index 2daf189..d7d0aa9 100644 --- a/src/vec1.rs +++ b/src/vec1.rs @@ -10,7 +10,7 @@ use std::{ /// `Vec1` represents a non-empty `Vec`. It derefs to `Vec` /// directly. #[derive(Clone, PartialEq, Serialize, Deserialize, Default)] -pub struct Vec1(pub(crate) Vec) +pub struct Vec1(Vec) where T: Debug;