Skip to content

Commit 97dd250

Browse files
committed
Rustonomicon: Reword potentially confusing comment in Vec::drain.
1 parent c08deef commit 97dd250

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/doc/nomicon/vec-drain.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ impl<T> Vec<T> {
132132
unsafe {
133133
let iter = RawValIter::new(&self);
134134
135-
// this is a mem::forget safety thing. If this is forgotten, we just
135+
// this is a mem::forget safety thing. If Drain is forgotten, we just
136136
// leak the whole Vec's contents. Also we need to do this *eventually*
137137
// anyway, so why not do it now?
138138
self.len = 0;

src/doc/nomicon/vec-final.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ impl<T> Vec<T> {
158158
unsafe {
159159
let iter = RawValIter::new(&self);
160160

161-
// this is a mem::forget safety thing. If this is forgotten, we just
161+
// this is a mem::forget safety thing. If Drain is forgotten, we just
162162
// leak the whole Vec's contents. Also we need to do this *eventually*
163163
// anyway, so why not do it now?
164164
self.len = 0;

0 commit comments

Comments
 (0)