Update comment about leaking
This commit is contained in:
parent
aa83e2aa04
commit
21c2343d3f
1 changed files with 1 additions and 1 deletions
|
@ -192,7 +192,7 @@ use crate::ptr;
|
|||
/// unsafe { addr_of_mut!((*ptr).name).write("Bob".to_string()); }
|
||||
///
|
||||
/// // Initializing the `list` field
|
||||
/// // If there was a panic here, then the `String` in the `name` field would be leaked.
|
||||
/// // If there is a panic here, then the `String` in the `name` field leaks.
|
||||
/// unsafe { addr_of_mut!((*ptr).list).write(vec![0, 1, 2]); }
|
||||
///
|
||||
/// // All the fields are initialized, so we call `assume_init` to get an initialized Foo.
|
||||
|
|
Loading…
Add table
Reference in a new issue