diff --git a/vec-drain.md b/vec-drain.md index b6b2826..2367197 100644 --- a/vec-drain.md +++ b/vec-drain.md @@ -8,6 +8,9 @@ untouched. For now we'll only implement the "basic" full-range version. use std::marker::PhantomData; struct Drain<'a, T: 'a> { + // Need to bound the lifetime here, so we do it with `&'a mut Vec` + // because that's semantically what we contain. We're "just" calling + // `pop()` and `remove(0)`. vec: PhantomData<&'a mut Vec> start: *const T, end: *const T,