Skip to content

Commit

Permalink
Utf8Error::valid_up_to: make documented semantics more precise/useful
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSapin committed Sep 24, 2015
1 parent 8fe79bd commit 081278e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libcore/str/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ impl Utf8Error {
/// Returns the index in the given string up to which valid UTF-8 was
/// verified.
///
/// Starting at the index provided, but not necessarily at it precisely, an
/// invalid UTF-8 encoding sequence was found.
/// It is the maximum index such that `from_utf8(input[..index])`
/// would return `Some(_)`.
#[unstable(feature = "utf8_error", reason = "method just added",
issue = "27734")]
pub fn valid_up_to(&self) -> usize { self.valid_up_to }
Expand Down

0 comments on commit 081278e

Please sign in to comment.