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 Hashset #28

Merged
merged 5 commits into from
Nov 12, 2024
Merged

Conversation

WilliamTakeshi
Copy link
Contributor

@WilliamTakeshi WilliamTakeshi commented Oct 28, 2024

Hello!

First of all, thank you for the project. I discovered it through a Reddit post and was really interested in seeing how the implementation came together. I decided to start with the HashSet issue #5 since it looked like the most straightforward to start.

In the HashSet all the methods are the same as HashMap, except for the ones I removed and one that I renamed for clarity.

Please feel free to suggest any changes or give feedback—I’m open to it!

Thanks for your time!

Removed methods:

  • compute
  • get_key_value
  • get_or_insert
  • get_or_insert_with
  • keys
  • remove_entry
  • try_insert
  • update
  • update_or_insert
  • update_or_insert_with
  • values

Renamed:

  • contains_key -> contains

@WilliamTakeshi
Copy link
Contributor Author

I fixed cargo fmt and the check for 1.72

But I will probably need help with the mac stress and the errors here: https://github.com/ibraheemdev/papaya/actions/runs/11555441048/job/32448555759

I don't know what I changed that broke both :(

Copy link
Owner

@ibraheemdev ibraheemdev left a comment

Choose a reason for hiding this comment

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

This looks amazing, thanks!

Both of those CI errors look unrelated. The macOS stress test failure is a spurious stack overflow that I've been seeing occasionally, I suspect it's just due to the lower default stack size on macOS rather than an infinite recursion error, as the tests are intentionally quite intensive.

The other error is very odd, I'm not sure what's causing it. I'll take a look.

src/set.rs Outdated Show resolved Hide resolved
@ibraheemdev
Copy link
Owner

I've fixed the errors on master, this should be good to go now after the TODO is addressed.

@ibraheemdev
Copy link
Owner

Nice, thanks!

@ibraheemdev ibraheemdev merged commit 2d5aa2c into ibraheemdev:master Nov 12, 2024
15 checks passed
@ibraheemdev ibraheemdev added the feature New feature or request label Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants