Remove potentially misleading realloc parenthetical

This commit is contained in:
CAD97 2022-05-14 22:30:14 -05:00
parent 2a8a0fc423
commit 09dc24bc04
2 changed files with 5 additions and 9 deletions

View File

@ -208,11 +208,9 @@ unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u8 {
///
/// If this returns a non-null pointer, then ownership of the memory block
/// referenced by `ptr` has been transferred to this allocator.
/// The memory may or may not have been deallocated,
/// and should be considered unusable (unless of course it was
/// transferred back to the caller again via the return value of
/// this method). The new memory block is allocated with `layout`, but
/// with the `size` updated to `new_size`. This new layout should be
/// The memory may or may not have been deallocated, and should be
/// considered unusable. The new memory block is allocated with `layout`,
/// but with the `size` updated to `new_size`. This new layout should be
/// used when deallocating the new memory block with `dealloc`. The range
/// `0..min(layout.size(), new_size)` of the new memory block is
/// guaranteed to have the same values as the original block.

View File

@ -161,8 +161,7 @@ fn allocate_zeroed(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError> {
///
/// If this returns `Ok`, then ownership of the memory block referenced by `ptr` has been
/// transferred to this allocator. The memory may or may not have been freed, and should be
/// considered unusable unless it was transferred back to the caller again via the return value
/// of this method.
/// considered unusable.
///
/// If this method returns `Err`, then ownership of the memory block has not been transferred to
/// this allocator, and the contents of the memory block are unaltered.
@ -288,8 +287,7 @@ unsafe fn grow_zeroed(
///
/// If this returns `Ok`, then ownership of the memory block referenced by `ptr` has been
/// transferred to this allocator. The memory may or may not have been freed, and should be
/// considered unusable unless it was transferred back to the caller again via the return value
/// of this method.
/// considered unusable.
///
/// If this method returns `Err`, then ownership of the memory block has not been transferred to
/// this allocator, and the contents of the memory block are unaltered.