diff --git a/src/bytes.rs b/src/bytes.rs index da0ba3a6f..ec95e802d 100644 --- a/src/bytes.rs +++ b/src/bytes.rs @@ -142,6 +142,7 @@ impl Bytes { Bytes::from_static(EMPTY) } + /// Creates a new empty `Bytes`. #[cfg(all(loom, test))] pub fn new() -> Self { const EMPTY: &[u8] = &[]; @@ -172,6 +173,7 @@ impl Bytes { } } + /// Creates a new `Bytes` from a static slice. #[cfg(all(loom, test))] pub fn from_static(bytes: &'static [u8]) -> Self { Bytes {