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

Issue #39688 - Help people find String::as_bytes() for UTF-8 #40226

Merged
merged 1 commit into from
Mar 9, 2017

Conversation

jdhorwitz
Copy link
Contributor

Added in links for the inverse functions so people will know that as_bytes() is the inverse of from_utf8() and vice versa.
?r @steveklabnik

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@@ -1913,7 +1917,7 @@ impl<T: fmt::Display + ?Sized> ToString for T {
use core::fmt::Write;
let mut buf = String::new();
buf.write_fmt(format_args!("{}", self))
.expect("a Display implementation return an error unexpectedly");
.expect("a Display implementation return an error unexpectedly");
Copy link
Member

Choose a reason for hiding this comment

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

this change is unrelated, but it's also good; you should probably remove it since it has nothing to do with this issue.

@steveklabnik
Copy link
Member

This looks great @jdhorwitz ! Two things:

  1. you haven't set up your git info to connect with your github account; you probably will want to do that. You can tell because it has the generic avatar instead of your github avatar.
  2. there was an extra little change in there
  3. When you fix that, could you squash the commits together?

Thanks! And as before, if you need help with any of this, just ping me on IRC 😄

@jdhorwitz jdhorwitz force-pushed the master branch 2 times, most recently from 81dd468 to f7b7c1e Compare March 3, 2017 17:03
@steveklabnik
Copy link
Member

@bors: r+ rollup

thank you!

@bors
Copy link
Contributor

bors commented Mar 3, 2017

📌 Commit f7b7c1e has been approved by steveklabnik

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Mar 3, 2017
Issue rust-lang#39688 - Help people find String::as_bytes() for UTF-8

Added in links for the inverse functions so people will know that as_bytes() is the inverse of from_utf8() and vice versa.
?r @steveklabnik
@bors
Copy link
Contributor

bors commented Mar 4, 2017

🔒 Merge conflict

@jdhorwitz jdhorwitz force-pushed the master branch 2 times, most recently from f1ef44f to 3cc94c3 Compare March 4, 2017 23:37
@steveklabnik
Copy link
Member

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Mar 4, 2017

📌 Commit 3cc94c3 has been approved by steveklabnik

@bors
Copy link
Contributor

bors commented Mar 4, 2017

⌛ Testing commit 3cc94c3 with merge 18cc9e7...

bors added a commit that referenced this pull request Mar 4, 2017
Issue #39688 - Help people find String::as_bytes() for UTF-8

Added in links for the inverse functions so people will know that as_bytes() is the inverse of from_utf8() and vice versa.
?r @steveklabnik
@bors
Copy link
Contributor

bors commented Mar 5, 2017

💔 Test failed - status-travis

@steveklabnik
Copy link
Member

@bors: retry

@bors
Copy link
Contributor

bors commented Mar 5, 2017

⌛ Testing commit 3cc94c3 with merge bb5d993...

bors added a commit that referenced this pull request Mar 5, 2017
Issue #39688 - Help people find String::as_bytes() for UTF-8

Added in links for the inverse functions so people will know that as_bytes() is the inverse of from_utf8() and vice versa.
?r @steveklabnik
@bors
Copy link
Contributor

bors commented Mar 5, 2017

💔 Test failed - status-travis

@GuillaumeGomez
Copy link
Member

@bors: r-

@@ -433,6 +433,8 @@ impl String {
///
/// [`str::from_utf8()`]: ../../std/str/fn.from_utf8.html
///
/// The inverse of this method is [`as_bytes`](#method.as_bytes).
Copy link
Member

Choose a reason for hiding this comment

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

Please don't use this link syntax. Move the url below and just keep [as_bytes] here.

Copy link
Member

Choose a reason for hiding this comment

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

Ah yeah, good call!

@@ -979,6 +981,8 @@ impl String {

/// Returns a byte slice of this `String`'s contents.
///
/// The inverse of this method is [`from_utf8`](#method.from_utf8).
Copy link
Member

Choose a reason for hiding this comment

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

Same comment.

@jdhorwitz
Copy link
Contributor Author

jdhorwitz commented Mar 5, 2017

Changes pushed @GuillaumeGomez , thank you for your feedback!

@frewsxcv
Copy link
Member

frewsxcv commented Mar 6, 2017

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 6, 2017

⌛ Testing commit 86bad49 with merge 010c716...

@bors
Copy link
Contributor

bors commented Mar 6, 2017

💔 Test failed - status-travis

@steveklabnik
Copy link
Member

steveklabnik commented Mar 6, 2017 via email

@bors
Copy link
Contributor

bors commented Mar 6, 2017

⌛ Testing commit 86bad49 with merge c05a044...

@bors
Copy link
Contributor

bors commented Mar 6, 2017

💔 Test failed - status-travis

@alexcrichton
Copy link
Member

@bors: retry

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Mar 6, 2017
Issue rust-lang#39688 - Help people find String::as_bytes() for UTF-8

Added in links for the inverse functions so people will know that as_bytes() is the inverse of from_utf8() and vice versa.
?r @steveklabnik
steveklabnik added a commit to steveklabnik/rust that referenced this pull request Mar 7, 2017
Issue rust-lang#39688 - Help people find String::as_bytes() for UTF-8

Added in links for the inverse functions so people will know that as_bytes() is the inverse of from_utf8() and vice versa.
?r @steveklabnik
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Mar 8, 2017
Issue rust-lang#39688 - Help people find String::as_bytes() for UTF-8

Added in links for the inverse functions so people will know that as_bytes() is the inverse of from_utf8() and vice versa.
?r @steveklabnik
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Mar 8, 2017
Issue rust-lang#39688 - Help people find String::as_bytes() for UTF-8

Added in links for the inverse functions so people will know that as_bytes() is the inverse of from_utf8() and vice versa.
?r @steveklabnik
arielb1 pushed a commit to arielb1/rust that referenced this pull request Mar 8, 2017
Issue rust-lang#39688 - Help people find String::as_bytes() for UTF-8

Added in links for the inverse functions so people will know that as_bytes() is the inverse of from_utf8() and vice versa.
?r @steveklabnik
bors added a commit that referenced this pull request Mar 9, 2017
@bors bors merged commit 86bad49 into rust-lang:master Mar 9, 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.

None yet

8 participants