Get rid of heapless-bytes: use hopefully soon to be upstreamed heapless additions

This commit is contained in:
Nicolas Stalder
2020-05-22 01:51:09 +02:00
parent 6a1bbf831f
commit 2e584f0649
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
pub mod class;
pub mod instruction;
pub type Data = heapless_bytes::Bytes<crate::MAX_COMMAND_DATA>;
pub type Data = heapless::ByteBuf<crate::MAX_COMMAND_DATA>;
#[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,
})
}
+1 -1
View File
@@ -2,7 +2,7 @@
// #![no_std]
#[allow(non_camel_case_types)]
pub type U3076 = <heapless_bytes::consts::U2048 as core::ops::Add<heapless_bytes::consts::U1024>>::Output;
pub type U3076 = <heapless::consts::U2048 as core::ops::Add<heapless::consts::U1024>>::Output;
#[allow(non_camel_case_types)]
pub type MAX_COMMAND_DATA = U3076;
+1 -1
View File
@@ -1,7 +1,7 @@
pub mod status;
pub use status::Status;
pub type Data = heapless_bytes::Bytes<crate::MAX_COMMAND_DATA>;
pub type Data = heapless::ByteBuf<crate::MAX_COMMAND_DATA>;
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum Response {