Skip to content

Commit 956c581

Browse files
documentation incorrectly described from_utf8
Docs said from_utf8 accepts a vector when it actually accepts a slice of bytes.
1 parent 83a44c7 commit 956c581

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ impl FromStr for bool {
7676
Section: Creating a string
7777
*/
7878

79-
/// Converts a vector to a string slice without performing any allocations.
79+
/// Converts a slice of bytes to a string slice without performing any allocations.
8080
///
8181
/// Once the slice has been validated as utf-8, it is transmuted in-place and
8282
/// returned as a '&str' instead of a '&[u8]'

0 commit comments

Comments
 (0)