Skip to content

Improve documentation for the from_utf8 family #28812

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

Merged
merged 1 commit into from
Oct 3, 2015

Conversation

steveklabnik
Copy link
Member

Our docs were very basic for the various versions of from_utf8, so
this commit beefs them up.

It also improves docs for the &str variant's error, Utf8Error.

@rust-highfive
Copy link
Contributor

r? @brson

(rust_highfive has picked a reviewer for you, use r? to override)

@brson
Copy link
Contributor

brson commented Oct 2, 2015

r=me

@steveklabnik steveklabnik force-pushed the improve_str_from_utf8_docs branch from 13cf156 to f6a8b06 Compare October 2, 2015 19:44
@steveklabnik
Copy link
Member Author

@bors: r=brson rollup

@bors
Copy link
Collaborator

bors commented Oct 2, 2015

📌 Commit f6a8b06 has been approved by brson

/// (`&[u8]`) is made of bytes, so this function converts between the two.
/// Not all byte slices are valid string slices, however: `&str` requires
/// that it is valid UTF-8. During this conversion, `from_utf8_lossy()`
/// will replace any invalid UTF-8 sequences are replaced with
Copy link
Contributor

Choose a reason for hiding this comment

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

"will replace any invalid UTF-8 sequences are replaced with".

Copy link
Member Author

Choose a reason for hiding this comment

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

ahhh nice catch

@steveklabnik steveklabnik force-pushed the improve_str_from_utf8_docs branch from f6a8b06 to 4d73da9 Compare October 2, 2015 23:42
@steveklabnik
Copy link
Member Author

@bors: r=brson rollup

@bors
Copy link
Collaborator

bors commented Oct 2, 2015

📌 Commit 4d73da9 has been approved by brson

Our docs were very basic for the various versions of from_utf8, so
this commit beefs them up.

It also improves docs for the &str variant's error, Utf8Error.
steveklabnik added a commit to steveklabnik/rust that referenced this pull request Oct 3, 2015
…docs, r=brson

Our docs were very basic for the various versions of from_utf8, so
this commit beefs them up.

It also improves docs for the &str variant's error, Utf8Error.
steveklabnik added a commit to steveklabnik/rust that referenced this pull request Oct 3, 2015
…docs, r=brson

Our docs were very basic for the various versions of from_utf8, so
this commit beefs them up.

It also improves docs for the &str variant's error, Utf8Error.
bors added a commit that referenced this pull request Oct 3, 2015
@bors bors merged commit 4d73da9 into rust-lang:master Oct 3, 2015
@steveklabnik steveklabnik deleted the improve_str_from_utf8_docs branch June 19, 2016 20:32
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