Skip to content

HashMap::with_capacity_and_hasher has the wrong-ordered arguments #12743

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
wycats opened this issue Mar 6, 2014 · 0 comments · Fixed by #12746
Closed

HashMap::with_capacity_and_hasher has the wrong-ordered arguments #12743

wycats opened this issue Mar 6, 2014 · 0 comments · Fixed by #12746

Comments

@wycats
Copy link
Contributor

wycats commented Mar 6, 2014

http://static.rust-lang.org/doc/master/collections/hashmap/struct.HashMap.html#method.with_capacity_and_hasher

fn with_capacity_and_hasher(hasher: H, capacity: uint) -> HashMap<K, V, H>

If the name is with_capacity_and_hasher, the arguments should really be in the same order.

@huonw huonw added the A-libs label Mar 6, 2014
bors added a commit that referenced this issue Mar 7, 2014
The arguments were accidentally swapped in the wrong order.

Closes #12743
flip1995 pushed a commit to flip1995/rust that referenced this issue May 2, 2024
Remove `dead_code` paths

The following paths are `dead_code` and can be removed:

### `clippy_utils::paths::VEC_RESIZE`
* Introduced when `vec_resize_to_zero` lint added in PR rust-lang/rust-clippy#5637
* No longer used after commit rust-lang/rust-clippy@8acc4d2
### `clippy_utils::paths::SLICE_GET`
* Introduced when `get_first` lint added in PR rust-lang/rust-clippy#8882
* No longer used after commit rust-lang/rust-clippy@a8d80d5
### `clippy_utils::paths::STR_BYTES`
* Introduced when `bytes_count_to_len` lint added in PR rust-lang/rust-clippy#8711
* No longer used after commit rust-lang/rust-clippy@ba6a459

When the lints were moved into the `Methods` lint pass, they switched from using paths to diagnostic items.  However, the paths were never removed.  This occurred in PR rust-lang/rust-clippy#8957.

This relates to issue rust-lang/rust-clippy#5393

changelog: none
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 a pull request may close this issue.

2 participants