Skip to content

Commit

Permalink
fix: doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Breeze-P committed Nov 26, 2024
1 parent ff4d90e commit 7d7d947
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/producer/prealloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ pub struct PreAlloc {
}

impl PreAlloc {
/// Get the slice of the pre-allocated.
/// Get the slice of the [`PreAlloc`].
pub fn slice(&self) -> &[u8] {
self.data_block.slice().unwrap()
}

/// Get the capacity of the pre-allocated.
/// Get the capacity of the [`PreAlloc`].
pub fn capacity(&self) -> u32 {
self.data_block.capacity()
}

/// Write data to the pre-allocated.
/// Write data to the [`PreAlloc`].
pub fn write(&mut self, data: &[u8]) -> Result<()> {
self.data_block.write(data)
}
Expand Down

0 comments on commit 7d7d947

Please sign in to comment.