Skip to content

Commit df5b32e

Browse files
committed
Clarify double-drop comment
1 parent a4a6a67 commit df5b32e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/liballoc/vec.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2825,7 +2825,7 @@ impl<T, F> Drop for DrainFilter<'_, T, F>
28252825
// to execute `pred`, so we just backshift all the unprocessed
28262826
// elements and tell the vec that they still exist. The backshift
28272827
// is required to prevent a double-drop of the last successfully
2828-
// drained item following a panic in the predicate.
2828+
// drained item prior to a panic in the predicate.
28292829
let ptr = self.drain.vec.as_mut_ptr();
28302830
let src = ptr.add(self.drain.idx);
28312831
let dst = src.sub(self.drain.del);

0 commit comments

Comments
 (0)