-
Notifications
You must be signed in to change notification settings - Fork 13.5k
re-export Vec
in the collections crate
#12873
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
Conversation
This would introduce two ways to do the same thing, which we've generally shied away from doing. The current decision is to use |
I don't see why the collections module would exclude collections we use in the standard library. It's a module for a collection, and whether it is a crate is not relevant from an API perspective. If anything, it should be deprecated to use it directly from Not re-exporting collections defined in the standard library means if one of the other collections like a hash table, it requires a backwards incompatible change. There are many use cases for a map or set in the standard library. At the moment, it makes use of various sets and maps used by the standard C library (like the allocator) but these may be in Rust in the future. |
I think the endless questions like this indicate poor API design:
The |
Thanks for the pull request. Pull requests should have supporting that the feature is desired, but this pull request links to an issue that was already closed as wontfix. If you want to change people's opinions I recommend doing it in a more diplomatic way. Closing. |
The issue wasn't closed as WONTFIX. The reply only rejects moving |
I support this change. |
I'm in favour of it too, although rustdoc will need to be changed to be able to inline docs of cross-crate reexports at some point too. |
I was under the impression that later changes (i.e. moving it to a "secret" module in |
I haven't seen mention that we would also stop exporting |
I also assumed that all collections would be used through collections, and On Sat, Mar 15, 2014 at 8:22 PM, Brian Anderson [email protected]:
|
If we're not planning on making (The consistency and backwards compatibility is a factor here too. What if something in (FWIW, I think I would prefer to have a |
When a user wants an overview of the available collections provided by the standard libraries, they should be able to look in a single module. This module can also be the location of any collection-agnostic documentation and the location of traits like |
Vec is a collection, I would like it in or re-export in libcollections.
|
Closing due to inactivity. I believe that the story is still developing around |
@alexcrichton wait, wasn't the counter-argument presented by @thestinger in #12542 (the counter-argument I took to be his justification for reopening #12542) exactly the proposal being put forth in this issue? |
Add new lint `hashset_insert_after_contains` This PR closes rust-lang/rust-clippy#11103. This is my first PR creating a new lint (and the second attempt of creating this PR, the first one I was not able to continue because of personal reasons). Thanks for the patience :) The idea of the lint is to find insert in hashmanps inside if staments that are checking if the hashmap contains the same value that is being inserted. This is not necessary since you could simply call the insert and check for the bool returned if you still need the if statement. changelog: new lint: [hashset_insert_after_contains]
Closes #12542