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

doc: Method examples for String #16027

Merged
merged 1 commit into from
Jul 29, 2014
Merged

doc: Method examples for String #16027

merged 1 commit into from
Jul 29, 2014

Conversation

treeman
Copy link
Contributor

@treeman treeman commented Jul 27, 2014

No description provided.

@treeman treeman changed the title Doc: Method examples for String doc: Method examples for String Jul 27, 2014
@@ -42,6 +48,14 @@ impl String {
}

/// Creates a new string buffer with the given capacity.
/// The string will be able to hold exactly `capacity` elements without
/// reallocating. If `capacity` is 0, the string will not allocate.
Copy link
Member

Choose a reason for hiding this comment

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

😍

Copy link
Member

Choose a reason for hiding this comment

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

With strings the term "elements" may refer to more than one concept, so could you explicitly say that it will hold exactly the number of bytes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yes, good catch.

@steveklabnik
Copy link
Member

r=me with a slightly improved UTF-8 wording

@treeman
Copy link
Contributor Author

treeman commented Jul 27, 2014

Fair points, thanks.

@alexcrichton
Copy link
Member

Looks good to me! Could you squash the commits as well?

Reword comments on unsafe methods regarding UTF-8.
@treeman
Copy link
Contributor Author

treeman commented Jul 28, 2014

Squashed.

@bors bors closed this Jul 29, 2014
@bors bors merged commit 3f56846 into rust-lang:master Jul 29, 2014
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 11, 2023
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.

4 participants