-
Notifications
You must be signed in to change notification settings - Fork 294
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
2 changed files
with
13 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters