Skip to content

Conversation

rustyrazorblade
Copy link
Contributor

Docs said from_utf8 accepts a vector when it actually accepts an array of bytes.

@steveklabnik
Copy link
Contributor

Thank you!!!

@@ -76,7 +76,7 @@ impl FromStr for bool {
Section: Creating a string
*/

/// Converts a vector to a string slice without performing any allocations.
/// Converts an array of bytes to a string slice without performing any allocations.
Copy link
Member

Choose a reason for hiding this comment

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

I believe the preferred terminology here is "slice of bytes". "Array of bytes" implies e.g. [u8, ..10].

Copy link
Contributor

Choose a reason for hiding this comment

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

ahh you are correct: I missed the & because of the lifetime 😅

@rustyrazorblade mind updating please?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure no problem

@rustyrazorblade
Copy link
Contributor Author

Alright, updated.

@steveklabnik
Copy link
Contributor

Sorry, would you mind squashing?

Docs said from_utf8 accepts a vector when it actually accepts a slice of bytes.
@rustyrazorblade
Copy link
Contributor Author

Sure. Rebased & squashed.

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Dec 9, 2014
Docs said from_utf8 accepts a vector when it actually accepts an array of bytes.
@bors bors merged commit 956c581 into rust-lang:master Dec 9, 2014
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