From 458a148ab13e8f251993fc463626a56f53fed5fb Mon Sep 17 00:00:00 2001 From: ennucore Date: Sat, 21 Mar 2020 23:14:29 +0300 Subject: [PATCH] ways --- src/transport.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/transport.rs b/src/transport.rs index 1590e63..3f9ca42 100644 --- a/src/transport.rs +++ b/src/transport.rs @@ -5,17 +5,20 @@ use alloc::vec::Vec; use alloc::boxed::Box; #[cfg(not(feature = "std"))] -pub struct Transport {} +pub struct Transport { + id: [u8; 64] +} #[cfg(feature = "std")] pub struct Transport { - ways: Vec> + ways: Vec>, + id: [u8; 64] } #[cfg(not(feature = "std"))] impl Transport { pub fn new() -> Self { - Self {} + Self {id: [0; 64]} } pub fn send(&self, msg: &Message) { @@ -32,7 +35,7 @@ impl Transport { #[cfg(feature = "std")] impl Transport { pub fn new() -> Self { - Self {ways: Vec::>::new()} + Self {ways: Vec::>::new(), id: [0; 64]} } pub fn send(&self, msg: &Message) {