Skip to content

Commit e97d295

Browse files
committed
Remove incorrect comment in Vec::drain
1 parent 2a92176 commit e97d295

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

library/alloc/src/vec/mod.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1999,9 +1999,7 @@ impl<T, A: Allocator> Vec<T, A> {
19991999
unsafe {
20002000
// set self.vec length's to start, to be safe in case Drain is leaked
20012001
self.set_len(start);
2002-
// Use the borrow in the IterMut to indicate borrowing behavior of the
2003-
// whole Drain iterator (like &mut T).
2004-
let range_slice = slice::from_raw_parts_mut(self.as_mut_ptr().add(start), end - start);
2002+
let range_slice = slice::from_raw_parts(self.as_ptr().add(start), end - start);
20052003
Drain {
20062004
tail_start: end,
20072005
tail_len: len - end,

0 commit comments

Comments
 (0)