Skip to content

Conversation

frewsxcv
Copy link
Contributor

@frewsxcv frewsxcv commented Aug 1, 2017

No description provided.

@@ -146,7 +146,8 @@ impl<T: Hash + Eq> HashSet<T, RandomState> {
///
/// ```
/// use std::collections::HashSet;
/// let mut set: HashSet<i32> = HashSet::with_capacity(10);
/// let set: HashSet<i32> = HashSet::with_capacity(10);
/// assert!(set.capacity() >= 10);
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't it be more accurate to check if the capacity is equal to 10 instead of >= ?

Copy link
Contributor

Choose a reason for hiding this comment

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

In general, the allocator may give you more than you asked for.

Copy link
Member

Choose a reason for hiding this comment

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

Hum ok.

@GuillaumeGomez
Copy link
Member

Just a small nit. Also, is it normal that you have this much commits?

Copy link
Contributor

@steveklabnik steveklabnik left a comment

Choose a reason for hiding this comment

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

travis is failing, but overall looks good to me

@QuietMisdreavus
Copy link
Contributor

Travis says the build was cancelled before it ever started (??) but otherwise the change looks good.

@frewsxcv frewsxcv closed this Aug 1, 2017
@frewsxcv frewsxcv reopened this Aug 1, 2017
@frewsxcv frewsxcv force-pushed the frewsxcv-hashset-docs branch from 00d72a1 to d9df296 Compare August 1, 2017 23:51
@frewsxcv
Copy link
Contributor Author

frewsxcv commented Aug 2, 2017

rebased, tests pass

@bors r=steveklabnik,quietmisdreavus rollup

@bors
Copy link
Collaborator

bors commented Aug 2, 2017

📌 Commit d9df296 has been approved by steveklabnik,quietmisdreavus

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Aug 2, 2017
…teveklabnik,quietmisdreavus

Improve docs & doc examples for HashSet.

None
bors added a commit that referenced this pull request Aug 2, 2017
Rollup of 6 pull requests

- Successful merges: #43389, #43423, #43581, #43585, #43597, #43598
- Failed merges:
@bors bors merged commit d9df296 into rust-lang:master Aug 2, 2017
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.

5 participants