about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAdrian Heine né Lang <mail@adrianheine.de>2018-11-22 15:26:16 +0100
committerGitHub <noreply@github.com>2018-11-22 15:26:16 +0100
commit37f719e0d38104b6c7d5fb7302e2388d4d4055df (patch)
treebd257f4d5260cafe3fd603e54765c6e03c60d6e5
parent93fa2d76bd9a8ffbbb46df2da6d27c13ee7fa73e (diff)
downloadrust-37f719e0d38104b6c7d5fb7302e2388d4d4055df.tar.gz
rust-37f719e0d38104b6c7d5fb7302e2388d4d4055df.zip
std::str Adapt documentation to reality
-rw-r--r--src/libcore/str/mod.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs
index a316093825a..89efa120a6f 100644
--- a/src/libcore/str/mod.rs
+++ b/src/libcore/str/mod.rs
@@ -1424,10 +1424,8 @@ fn contains_nonascii(x: usize) -> bool {
     (x & NONASCII_MASK) != 0
 }
 
-/// Walks through `iter` checking that it's a valid UTF-8 sequence,
-/// returning `true` in that case, or, if it is invalid, `false` with
-/// `iter` reset such that it is pointing at the first byte in the
-/// invalid sequence.
+/// Walks through `v` checking that it's a valid UTF-8 sequence,
+/// returning `Ok(())` in that case, or, if it is invalid, `Err(err)`.
 #[inline]
 fn run_utf8_validation(v: &[u8]) -> Result<(), Utf8Error> {
     let mut index = 0;