Merge pull request 'added missing doc_cfg attribute' (#63) from add-missing-doc-cfg-attr into main
All checks were successful
Rust/spacepackets/pipeline/head This commit looks good

Reviewed-on: #63
This commit is contained in:
Robin Müller 2024-02-19 20:12:15 +01:00
commit 6ea18d3715

View File

@ -77,6 +77,7 @@ pub trait UnsignedEnum {
fn value(&self) -> u64; fn value(&self) -> u64;
#[cfg(feature = "alloc")] #[cfg(feature = "alloc")]
#[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))]
fn to_vec(&self) -> alloc::vec::Vec<u8> { fn to_vec(&self) -> alloc::vec::Vec<u8> {
let mut buf = alloc::vec![0; self.size()]; let mut buf = alloc::vec![0; self.size()];
self.write_to_be_bytes(&mut buf).unwrap(); self.write_to_be_bytes(&mut buf).unwrap();