add missing doc_cfg attr
Some checks are pending
Rust/spacepackets/pipeline/head Build started...

This commit is contained in:
Robin Müller 2024-03-04 12:55:16 +01:00
parent 240f0bc267
commit 0ab69b3ddc
Signed by: muellerr
GPG Key ID: A649FB78196E3849

View File

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