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

Add capacity() to VecMap #19528

Merged
merged 1 commit into from
Dec 5, 2014
Merged

Conversation

aliblong
Copy link
Contributor

@aliblong aliblong commented Dec 4, 2014

Part of #18424

Adds capacity() function to VecMap, as per the collections reform.

(Salvaged from #19516, #19523, while we await an RFC regarding reserve/reserve_index for VecMap)

/// assert_eq!(map.capacity(), 10);
/// ```
#[inline]
#[stable]
Copy link
Contributor

Choose a reason for hiding this comment

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

We're currently marking these with #[unstable = "matches collection reform specification, waiting for dust to settle"]

@Gankra
Copy link
Contributor

Gankra commented Dec 4, 2014

Thanks for persevering on this! I hope to have the RFC ready next week. I will CC you on it.

@aliblong
Copy link
Contributor Author

aliblong commented Dec 4, 2014

Thanks! I was slightly worried I would be annoying you with all the PRs, but this is my first set of PRs ever, and I wanted to establish myself as a contributor :P

@Gankra
Copy link
Contributor

Gankra commented Dec 4, 2014

Everything looks good, can you squash the commits into one for a clean history?

Changed capacity() tag to unstable and fixed doc assert
@aliblong aliblong force-pushed the add_vecmap_capacity branch from 4616436 to 0d3c415 Compare December 4, 2014 18:22
@aliblong
Copy link
Contributor Author

aliblong commented Dec 4, 2014

Okay, squashed

@alexcrichton alexcrichton merged commit 0d3c415 into rust-lang:master Dec 5, 2014
@aliblong aliblong deleted the add_vecmap_capacity branch December 5, 2014 23:27
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.

3 participants