Skip to content

Conversation

@cuviper
Copy link
Member

@cuviper cuviper commented Sep 12, 2020

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.

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.
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.
@Amanieu
Copy link
Member

Amanieu commented Sep 13, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Sep 13, 2020

📌 Commit a56db69 has been approved by Amanieu

@bors
Copy link
Contributor

bors commented Sep 13, 2020

⌛ Testing commit a56db69 with merge d26b37a...

@bors
Copy link
Contributor

bors commented Sep 13, 2020

☀️ Test successful - checks-travis
Approved by: Amanieu
Pushing d26b37a to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants