You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #201 - cuviper:safe-drain, r=Amanieu
Make `RawTable::drain` safe
The documentation indicated a safety question of the lifetime, but there
is a lifetime parameter on `RawDrain` to ensure that. Also, the similar
`par_drain` is already a safe method.
I also adjusted the safety comments on `drain_iter_from`/`into_iter_from`.
The safety contract for these methods is really about the validity of
the given `RawIter` for this `RawTable`. Once that's established, the
lifetime is no longer a concern, since `RawDrain<'_, T>` has a borrow
and `RawIntoIter<T>` is a consuming owner.
0 commit comments