From df5b32ee9b98838c1cccc93f75f941ecafc9d086 Mon Sep 17 00:00:00 2001 From: Aaron Loucks Date: Sun, 7 Jul 2019 16:36:19 -0400 Subject: [PATCH] Clarify double-drop comment --- src/liballoc/vec.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs index 4adbe6467a1e8..8939248adab0d 100644 --- a/src/liballoc/vec.rs +++ b/src/liballoc/vec.rs @@ -2825,7 +2825,7 @@ impl Drop for DrainFilter<'_, T, F> // to execute `pred`, so we just backshift all the unprocessed // elements and tell the vec that they still exist. The backshift // is required to prevent a double-drop of the last successfully - // drained item following a panic in the predicate. + // drained item prior to a panic in the predicate. let ptr = self.drain.vec.as_mut_ptr(); let src = ptr.add(self.drain.idx); let dst = src.sub(self.drain.del);