From 803e1ffb15a5ab985f868afabcf1dd14fa690363 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..cd878f88 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. + // Prevent self's destructor from being called. std::mem::forget(self); s