Skip to content

Commit 9673ace

Browse files
committed
Fix a couple of issues in from_utf8 docs
1 parent bc8495a commit 9673ace

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libcore/str/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,10 @@ impl Utf8Error {
174174
///
175175
/// If you are sure that the byte slice is valid UTF-8, and you don't want to
176176
/// incur the overhead of the validity check, there is an unsafe version of
177-
/// this function, [`from_utf8_unchecked()`][fromutf8], which has the same
177+
/// this function, [`from_utf8_unchecked()`][fromutf8u], which has the same
178178
/// behavior but skips the check.
179179
///
180-
/// [fromutf8]: fn.from_utf8.html
180+
/// [fromutf8u]: fn.from_utf8_unchecked.html
181181
///
182182
/// If you need a `String` instead of a `&str`, consider
183183
/// [`String::from_utf8()`][string].
@@ -275,7 +275,7 @@ unsafe fn from_raw_parts_mut<'a>(p: *mut u8, len: usize) -> &'a mut str {
275275
/// Converts a slice of bytes to a string slice without checking
276276
/// that the string contains valid UTF-8.
277277
///
278-
/// See the safe version, [`from_utf8()`][fromutf8], for more.
278+
/// See the safe version, [`from_utf8()`][fromutf8], for more information.
279279
///
280280
/// [fromutf8]: fn.from_utf8.html
281281
///

0 commit comments

Comments
 (0)