Skip to content

Commit

Permalink
Rollup merge of rust-lang#56162 - adrianheine:patch-1, r=withoutboats
Browse files Browse the repository at this point in the history
std::str Adapt documentation to reality
  • Loading branch information
kennytm authored Nov 23, 2018
2 parents c9870a4 + 37f719e commit 69d4901
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/libcore/str/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 69d4901

Please sign in to comment.