Skip to content

Commit f7b7c1e

Browse files
committed
Issue #39688 - Help people find String::as_bytes() for UTF-8 r? @steveklabnik
1 parent c0b7112 commit f7b7c1e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libcollections/string.rs

+4
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,8 @@ impl String {
433433
///
434434
/// [`str::from_utf8()`]: ../../std/str/fn.from_utf8.html
435435
///
436+
/// The inverse of this method is [`as_bytes`](#method.as_bytes).
437+
///
436438
/// # Errors
437439
///
438440
/// Returns `Err` if the slice is not UTF-8 with a description as to why the
@@ -979,6 +981,8 @@ impl String {
979981

980982
/// Returns a byte slice of this `String`'s contents.
981983
///
984+
/// The inverse of this method is [`from_utf8`](#method.from_utf8).
985+
///
982986
/// # Examples
983987
///
984988
/// Basic usage:

0 commit comments

Comments
 (0)