From 3734e15b2201e2d2551d3266affb9660dc4d7685 Mon Sep 17 00:00:00 2001 From: Sachin Charakhwal Date: Tue, 1 Oct 2024 19:39:26 +0530 Subject: [PATCH] types: update comment on deallocation in `StringBuilder` --- crates/types/src/string.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/types/src/string.rs b/crates/types/src/string.rs index f8bfbcae..ba688009 100644 --- a/crates/types/src/string.rs +++ b/crates/types/src/string.rs @@ -204,7 +204,7 @@ impl StringBuilder { pub fn finish(self) -> String { let s = String { data: self.inner.data, len: self.inner.len }; - // Prevent the `Drop` implementation from freeing this memory. + // Tell the compiler to not call self's destructor. std::mem::forget(self); s