From 2e584f064968ff500cb0c257c4e0bc89091fa6b9 Mon Sep 17 00:00:00 2001 From: Nicolas Stalder Date: Fri, 22 May 2020 01:51:09 +0200 Subject: [PATCH] Get rid of heapless-bytes: use hopefully soon to be upstreamed heapless additions --- src/command.rs | 4 ++-- src/lib.rs | 2 +- src/response.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/command.rs b/src/command.rs index 18c973b..3c3a03e 100644 --- a/src/command.rs +++ b/src/command.rs @@ -1,7 +1,7 @@ pub mod class; pub mod instruction; -pub type Data = heapless_bytes::Bytes; +pub type Data = heapless::ByteBuf; #[derive(Clone, Debug, PartialEq, Eq)] pub struct Command { @@ -83,7 +83,7 @@ impl core::convert::TryFrom<&[u8]> for Command { p1: header[2], p2: header[3], le: parsed.le, - data: Data::try_from_slice(data_slice).unwrap(), + data: Data::from_slice(data_slice).unwrap(), extended: parsed.extended, }) } diff --git a/src/lib.rs b/src/lib.rs index 921f783..03e746e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,7 +2,7 @@ // #![no_std] #[allow(non_camel_case_types)] -pub type U3076 = >::Output; +pub type U3076 = >::Output; #[allow(non_camel_case_types)] pub type MAX_COMMAND_DATA = U3076; diff --git a/src/response.rs b/src/response.rs index cb36cac..e52310d 100644 --- a/src/response.rs +++ b/src/response.rs @@ -1,7 +1,7 @@ pub mod status; pub use status::Status; -pub type Data = heapless_bytes::Bytes; +pub type Data = heapless::ByteBuf; #[derive(Clone, Debug, Eq, PartialEq)] pub enum Response {