From fe0fce35c3dafbe7a328a1a907db4a47ec1300da Mon Sep 17 00:00:00 2001 From: Nick Mertin Date: Sun, 12 May 2024 12:44:45 -0400 Subject: [PATCH] Update comments in Reallocator implementations --- src/base/default_allocator.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base/default_allocator.rs b/src/base/default_allocator.rs index 30207968c..3b5d12811 100644 --- a/src/base/default_allocator.rs +++ b/src/base/default_allocator.rs @@ -241,7 +241,7 @@ where // Safety: // - We don’t care about dropping elements because the caller is responsible for dropping things. - // - We forget `buf` so that we don’t drop the other elements. + // - We forget `buf` so that we don’t drop the other elements, but ensure the buffer itself is cleaned up. buf.forget_elements(); res @@ -272,7 +272,7 @@ where // Safety: // - We don’t care about dropping elements because the caller is responsible for dropping things. - // - We forget `buf` so that we don’t drop the other elements. + // - We forget `buf` so that we don’t drop the other elements, but ensure the buffer itself is cleaned up. buf.forget_elements(); res