From 682c5afb26746a0d45177bd05b9f078ed84fd5f4 Mon Sep 17 00:00:00 2001 From: Aumetra Weisman Date: Thu, 21 Mar 2024 10:01:09 +0100 Subject: [PATCH] Adjust documentation --- packages/std/src/memory.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/std/src/memory.rs b/packages/std/src/memory.rs index 40ac8ff03a..eba092845e 100644 --- a/packages/std/src/memory.rs +++ b/packages/std/src/memory.rs @@ -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) -> *mut Region { let region = build_region(&buffer); mem::forget(buffer);