-
Notifications
You must be signed in to change notification settings - Fork 288
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 From<HashMap<T, ()>>
for HashSet<T>
.
#235
Conversation
Those clippy CI failures don't look related to this? |
This happens when clippy adds a new lint. Can you add the |
I could if I understood why these functions can panic. I attempted to dig into the codebase, but I can't understand why Line 3162 in 83ac6fd
key to None. As far as I can see this is the only way to get a key of None, which will cause these panics later. Example code that panics:
let mut m: HashMap<i32, i32> = HashMap::new();
let o = m.entry(0).insert(1);
let (k, v) = o.replace_entry(2); The same behavior should be possible with replace_key instead of replace_entry as well. Why does OccupiedEntry have |
|
I see. I suppose I can go add |
I don't think there is a better option. |
This should be good to go now I think. |
@bors r+ |
📌 Commit ae8c196 has been approved by |
☀️ Test successful - checks-travis |
Closes #219.