Skip to content

Commit

Permalink
enable encode_to_vec for no_std (#594)
Browse files Browse the repository at this point in the history
Co-authored-by: Lucio Franco <[email protected]>
  • Loading branch information
ccbrown and LucioFranco authored Feb 21, 2022
1 parent afdc4c9 commit ae84e7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/message.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use alloc::boxed::Box;
use alloc::vec::Vec;

use core::fmt::Debug;
use core::usize;

Expand Down Expand Up @@ -59,7 +61,6 @@ pub trait Message: Debug + Send + Sync {
Ok(())
}

#[cfg(feature = "std")]
/// Encodes the message to a newly allocated buffer.
fn encode_to_vec(&self) -> Vec<u8>
where
Expand Down Expand Up @@ -90,7 +91,6 @@ pub trait Message: Debug + Send + Sync {
Ok(())
}

#[cfg(feature = "std")]
/// Encodes the message with a length-delimiter to a newly allocated buffer.
fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where
Expand Down

0 comments on commit ae84e7d

Please sign in to comment.