We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 666e709 commit 682c5afCopy full SHA for 682c5af
packages/std/src/memory.rs
@@ -33,7 +33,7 @@ pub fn alloc(size: usize) -> *mut Region {
33
/// Similar to alloc, but instead of creating a new vector it consumes an existing one and returns
34
/// a pointer to the Region (preventing the memory from being freed until explicitly called later).
35
///
36
-/// 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.
37
pub fn release_buffer(buffer: Vec<u8>) -> *mut Region {
38
let region = build_region(&buffer);
39
mem::forget(buffer);
0 commit comments