Skip to content

Commit 37f719e

Browse files
authored
std::str Adapt documentation to reality
1 parent 93fa2d7 commit 37f719e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/libcore/str/mod.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -1424,10 +1424,8 @@ fn contains_nonascii(x: usize) -> bool {
14241424
(x & NONASCII_MASK) != 0
14251425
}
14261426

1427-
/// Walks through `iter` checking that it's a valid UTF-8 sequence,
1428-
/// returning `true` in that case, or, if it is invalid, `false` with
1429-
/// `iter` reset such that it is pointing at the first byte in the
1430-
/// invalid sequence.
1427+
/// Walks through `v` checking that it's a valid UTF-8 sequence,
1428+
/// returning `Ok(())` in that case, or, if it is invalid, `Err(err)`.
14311429
#[inline]
14321430
fn run_utf8_validation(v: &[u8]) -> Result<(), Utf8Error> {
14331431
let mut index = 0;

0 commit comments

Comments
 (0)