Skip to content

Commit 21c2343

Browse files
Update comment about leaking
1 parent aa83e2a commit 21c2343

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/mem/maybe_uninit.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ use crate::ptr;
192192
/// unsafe { addr_of_mut!((*ptr).name).write("Bob".to_string()); }
193193
///
194194
/// // Initializing the `list` field
195-
/// // If there was a panic here, then the `String` in the `name` field would be leaked.
195+
/// // If there is a panic here, then the `String` in the `name` field leaks.
196196
/// unsafe { addr_of_mut!((*ptr).list).write(vec![0, 1, 2]); }
197197
///
198198
/// // All the fields are initialized, so we call `assume_init` to get an initialized Foo.

0 commit comments

Comments
 (0)