Fix unused variable warning in doctest
This commit is contained in:
parent
9f5a3cccb8
commit
04a08c60a1
@ -407,6 +407,7 @@ pub unsafe fn replace<T>(dest: *mut T, mut src: T) -> T {
|
||||
/// // this point, `s` must no longer be used, as the underlying memory has
|
||||
/// // been freed.
|
||||
/// s2 = String::default();
|
||||
/// assert_eq!(s2, "");
|
||||
///
|
||||
/// // Assigning to `s` would cause the old value to be dropped again,
|
||||
/// // resulting in undefined behavior.
|
||||
|
Loading…
Reference in New Issue
Block a user