Rustonomicon: Reword potentially confusing comment in Vec::drain.
This commit is contained in:
parent
c08deef982
commit
97dd25094c
@ -132,7 +132,7 @@ impl<T> Vec<T> {
|
||||
unsafe {
|
||||
let iter = RawValIter::new(&self);
|
||||
|
||||
// this is a mem::forget safety thing. If this is forgotten, we just
|
||||
// this is a mem::forget safety thing. If Drain is forgotten, we just
|
||||
// leak the whole Vec's contents. Also we need to do this *eventually*
|
||||
// anyway, so why not do it now?
|
||||
self.len = 0;
|
||||
|
@ -158,7 +158,7 @@ impl<T> Vec<T> {
|
||||
unsafe {
|
||||
let iter = RawValIter::new(&self);
|
||||
|
||||
// this is a mem::forget safety thing. If this is forgotten, we just
|
||||
// this is a mem::forget safety thing. If Drain is forgotten, we just
|
||||
// leak the whole Vec's contents. Also we need to do this *eventually*
|
||||
// anyway, so why not do it now?
|
||||
self.len = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user