Merge pull request 'add missing doc_cfg attr' (#67) from missing-doc-cfg-attr into main
Rust/spacepackets/pipeline/head This commit looks good Details

Reviewed-on: #67
This commit is contained in:
Robin Müller 2024-03-04 12:58:28 +01:00
commit ea05a547ac
1 changed files with 1 additions and 0 deletions

View File

@ -196,6 +196,7 @@ pub trait TimeWriter {
fn write_to_bytes(&self, bytes: &mut [u8]) -> Result<usize, TimestampError>;
#[cfg(feature = "alloc")]
#[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))]
fn to_vec(&self) -> Result<alloc::vec::Vec<u8>, TimestampError> {
let mut vec = alloc::vec![0; self.len_written()];
self.write_to_bytes(&mut vec)?;