added missing alloc feature gate
This commit is contained in:
parent
90cca0fd9e
commit
28e9dd9b29
@ -42,6 +42,7 @@ pub trait GenericTlv {
|
||||
pub trait WritableTlv {
|
||||
fn write_to_bytes(&self, buf: &mut [u8]) -> Result<usize, ByteConversionError>;
|
||||
fn len_written(&self) -> usize;
|
||||
#[cfg(feautre = "alloc")]
|
||||
fn to_vec(&self) -> Vec<u8> {
|
||||
let mut buf = vec![0; self.len_written()];
|
||||
self.write_to_bytes(&mut buf).unwrap();
|
||||
|
Loading…
x
Reference in New Issue
Block a user