From 5ff4cc4870cfae9c15ed67ec6f2a2834da023659 Mon Sep 17 00:00:00 2001 From: Nicolas Stalder Date: Thu, 10 Jun 2021 22:34:46 +0200 Subject: [PATCH] Bump heapless to const generics --- Cargo.toml | 4 ++-- src/traits.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 356cd10..7dad67b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "flexiber" -version = "0.1.0" +version = "0.2.0" authors = ["Nicolas Stalder ", "RustCrypto Developers"] license = "Apache-2.0 OR MIT" edition = "2018" @@ -15,7 +15,7 @@ delog = "0.1.0" flexiber_derive = { version = "0.1", optional = true, path = "derive" } [dependencies.heapless] -version = "0.6.0" +version = "0.7.0" optional = true [dev-dependencies] diff --git a/src/traits.rs b/src/traits.rs index f685e86..d317da9 100644 --- a/src/traits.rs +++ b/src/traits.rs @@ -126,7 +126,7 @@ pub trait Encodable { pub trait EncodableHeapless: Encodable { /// Encode this message as BER-TLV, appending it to the provided /// heapless byte vector. - fn encode_to_heapless_vec>(&self, buf: &mut heapless::Vec) -> Result { + fn encode_to_heapless_vec(&self, buf: &mut heapless::Vec) -> Result { let expected_len = self.encoded_length()?.to_usize(); let current_len = buf.len(); // TODO(nickray): add a specific error for "Overcapacity" conditional on heapless feature? @@ -148,7 +148,7 @@ pub trait EncodableHeapless: Encodable { } /// Serialize this message as a byte vector. - fn to_heapless_vec>(&self) -> Result> { + fn to_heapless_vec(&self) -> Result> { let mut buf = heapless::Vec::new(); self.encode_to_heapless_vec(&mut buf)?; Ok(buf)