Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Debug, FusedIterator and Iterator::fold for all HashTable iterators #561

Merged
merged 1 commit into from
Sep 22, 2024

Conversation

Amanieu
Copy link
Member

@Amanieu Amanieu commented Sep 20, 2024

No description provided.

Copy link
Member

@cuviper cuviper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can IterHash and IterHashMut also get Debug?
And perhaps Clone for IterHash too?

F: FnMut(B, Self::Item) -> B,
{
self.inner
.fold(init, |acc, bucket| unsafe { f(acc, bucket.as_ref()) })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is okay, but the inner RawIterHash isn't doing anything special for fold.
(Ditto for IterHashMut, and Drain's RawDrain.)

}
}

impl<T> Default for RawIterHash<T> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great - did you mean to propagate that up too?

@cuviper
Copy link
Member

cuviper commented Sep 22, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Sep 22, 2024

📌 Commit 7af86ab has been approved by cuviper

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Sep 22, 2024

⌛ Testing commit 7af86ab with merge 7cf51ea...

@bors
Copy link
Contributor

bors commented Sep 22, 2024

☀️ Test successful - checks-actions
Approved by: cuviper
Pushing 7cf51ea to master...

@bors bors merged commit 7cf51ea into rust-lang:master Sep 22, 2024
24 checks passed
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