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 {