Skip to content

use consistent terminology to refer to containers/collections #12543

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

Closed
thestinger opened this issue Feb 25, 2014 · 4 comments
Closed

use consistent terminology to refer to containers/collections #12543

thestinger opened this issue Feb 25, 2014 · 4 comments
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup.
Milestone

Comments

@thestinger
Copy link
Contributor

There is a container module in std and a separate collections crate. This should be consistent, and the traits should be in the same place as the containers.

@pnkfelix
Copy link
Member

The current set of traits in std::container are arguably not currently expressive enough to actually use in writing generic code.

So something needs to be done about that, because as it stands right now, it seems like container is not pulling its weight. We should either revamp the API's there, or remove container.

Assigning 1.0, P-backcompat-libs.

@pnkfelix pnkfelix added this to the 1.0 milestone Mar 13, 2014
@thestinger
Copy link
Contributor Author

It does work for allowing a graph library to make use of arbitrary set and map containers. It can't abstract over both in-memory and on-disk or virtual data structures and I think that's a fundamental limitation of Rust's trait system. It's simply not as expressive as C++ templates.

@huonw
Copy link
Member

huonw commented Mar 13, 2014

Reading it now, I think the triage missed the main point of this bug: the inconsistency of the name containers vs. the name collections.

brson added a commit to brson/rust that referenced this issue May 21, 2014
Also renames the `Container` trait to `Collection`.

[breaking-change]
@aturon
Copy link
Member

aturon commented May 22, 2014

I strongly agree that the Containers traits, whatever they wind up being called, need to be revisited or possibly removed. Should that concern be opened as a separate issue?

@brson brson closed this as completed in 50942c7 Jun 9, 2014
mcpherrinm pushed a commit to mcpherrinm/rust that referenced this issue Jun 10, 2014
Also renames the `Container` trait to `Collection`.

[breaking-change]
flip1995 pushed a commit to flip1995/rust that referenced this issue Apr 4, 2024
…t,GuillaumeGomez

restrict manual_clamp to const case, bring it out of nursery

Implements the plan that I described in rust-lang/rust-clippy#9484 (comment)

This does two things primarily

1. Restrict `manual_clamp` such that it will only trigger if we are able to guarantee that `clamp` won't panic at runtime.
2. Bring `manual_clamp` out of nursery status and move it into the complexity group.

changelog: [`manual_clamp`]: Restrict this lint such that it only triggers if max and min are const, and max is greater than or equal to min. Then bring it out of the nursery group.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup.
Projects
None yet
Development

No branches or pull requests

4 participants