-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Convert rust_crate_map.cpp to Rust #9087
Conversation
@fhahn Sorry, but this already needs a rebase! |
Always good to see less C++! |
Thanks for the feedback, I've updated the patch & I hope I addressed all comments. |
@@ -332,7 +332,7 @@ impl<K: Hash + Eq, V> HashMap<K, V> { | |||
HashMap::with_capacity_and_keys(r.gen(), r.gen(), capacity) | |||
} | |||
|
|||
/// Create an empty HashMap with space for at least `capacity` | |||
/// Create an empty HashMap with space for at least `capacity` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation?
This looks good to me, nice work! r=me with @huonw's fixes and a rebase. |
This function can be use to create HashSets before the tls is initialized.
@alexcrichton Everything should be fixed, I changed the HashSet initialization to use 0 for k0 and k1 and added a FIXME to use random numbers, when there is a way to get them from the OS-RNG directly |
@fhahn Can you run |
Conflicts: src/libstd/rt/logging.rs
@catamorphism Done, all style errors should be fixed. |
This patch converts the rust_crate_map.cpp to Rust as mentioned at the end of #8880.
Fix broken link changelog: none
This patch converts the rust_crate_map.cpp to Rust as mentioned at the end of #8880.