use into_vc instead of public member

This commit is contained in:
vms 2020-07-25 11:07:20 +03:00
parent 5cf972b348
commit 6d42a84ba4
2 changed files with 3 additions and 3 deletions

View File

@ -129,7 +129,7 @@ where
safe_transmute::transmute_many::<u64, safe_transmute::SingleManyGuard>(&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<u64> = 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 _),

View File

@ -10,7 +10,7 @@ use std::{
/// `Vec1<T>` represents a non-empty `Vec<T>`. It derefs to `Vec<T>`
/// directly.
#[derive(Clone, PartialEq, Serialize, Deserialize, Default)]
pub struct Vec1<T>(pub(crate) Vec<T>)
pub struct Vec1<T>(Vec<T>)
where
T: Debug;