Skip to content

Commit

Permalink
Adjust documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
aumetra committed Mar 21, 2024
1 parent 666e709 commit 682c5af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/std/src/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub fn alloc(size: usize) -> *mut Region {
/// Similar to alloc, but instead of creating a new vector it consumes an existing one and returns
/// a pointer to the Region (preventing the memory from being freed until explicitly called later).
///
/// The resulting Region has capacity = length, the buffer capacity is shrunk down to its length.
/// The resulting Region spans the entire region allocated by the vector, preserving the length and capacity components.
pub fn release_buffer(buffer: Vec<u8>) -> *mut Region {
let region = build_region(&buffer);
mem::forget(buffer);
Expand Down

0 comments on commit 682c5af

Please sign in to comment.