From 86bad49ec1f787a4f69a77ccffa06e4967d0c796 Mon Sep 17 00:00:00 2001 From: Joshua Horwitz Date: Fri, 3 Mar 2017 01:24:19 -0500 Subject: [PATCH] Issue #39688 - Help people find String::as_bytes() for UTF-8 r? @steveklabnik --- src/libcollections/string.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs index 4979107ccadc7..43323676ab459 100644 --- a/src/libcollections/string.rs +++ b/src/libcollections/string.rs @@ -433,6 +433,10 @@ impl String { /// /// [`str::from_utf8()`]: ../../std/str/fn.from_utf8.html /// + /// The inverse of this method is [`as_bytes`]. + /// + /// [`as_bytes`]: #method.as_bytes + /// /// # Errors /// /// Returns `Err` if the slice is not UTF-8 with a description as to why the @@ -979,6 +983,10 @@ impl String { /// Returns a byte slice of this `String`'s contents. /// + /// The inverse of this method is [`from_utf8`]. + /// + /// [`from_utf8`]: #method.from_utf8 + /// /// # Examples /// /// Basic usage: