Rustonomicon: Reword potentially confusing comment in Vec::drain.

This commit is contained in:
Jørn Lode 2015-09-06 18:21:57 +02:00
parent c08deef982
commit 97dd25094c
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;