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

Convert rust_crate_map.cpp to Rust #9087

Closed
wants to merge 2 commits into from

Conversation

fhahn
Copy link
Contributor

@fhahn fhahn commented Sep 9, 2013

This patch converts the rust_crate_map.cpp to Rust as mentioned at the end of #8880.

@catamorphism
Copy link
Contributor

@fhahn Sorry, but this already needs a rebase!

@alexcrichton
Copy link
Member

Always good to see less C++!

@fhahn
Copy link
Contributor Author

fhahn commented Sep 10, 2013

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`
Copy link
Member

Choose a reason for hiding this comment

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

Indentation?

@alexcrichton
Copy link
Member

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.
@fhahn
Copy link
Contributor Author

fhahn commented Sep 11, 2013

@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

@catamorphism
Copy link
Contributor

@fhahn Can you run make tidy and re-push? Thanks!

Conflicts:
	src/libstd/rt/logging.rs
@fhahn
Copy link
Contributor Author

fhahn commented Sep 12, 2013

@catamorphism Done, all style errors should be fixed.

bors added a commit that referenced this pull request Sep 13, 2013
This patch converts the rust_crate_map.cpp to Rust as mentioned at the end of #8880.
@bors bors closed this Sep 13, 2013
@fhahn fhahn deleted the rust_crate_map branch January 7, 2014 17:33
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jul 18, 2022
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.

6 participants