Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Utf8Error::valid_up_to: make documented semantics more precise/useful #28637

Merged
merged 1 commit into from
Sep 26, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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