Skip to content

Commit

Permalink
types: update comment on deallocation in StringBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
SCJangra committed Oct 1, 2024
1 parent ca5bd19 commit 803e1ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/types/src/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 803e1ff

Please sign in to comment.