std: Stabilize utf8_error_error_len
feature
Stabilizes: * `Utf8Error::error_len` Closes #40494
This commit is contained in:
parent
cbfce40e1c
commit
3fae48107f
2 changed files with 1 additions and 2 deletions
|
@ -28,7 +28,6 @@
|
|||
#![feature(test)]
|
||||
#![feature(unboxed_closures)]
|
||||
#![feature(unicode)]
|
||||
#![feature(utf8_error_error_len)]
|
||||
|
||||
extern crate alloc;
|
||||
extern crate test;
|
||||
|
|
|
@ -207,7 +207,7 @@ impl Utf8Error {
|
|||
/// that starts at the index given by `valid_up_to()`.
|
||||
/// Decoding should resume after that sequence
|
||||
/// (after inserting a U+FFFD REPLACEMENT CHARACTER) in case of lossy decoding.
|
||||
#[unstable(feature = "utf8_error_error_len", reason ="new", issue = "40494")]
|
||||
#[stable(feature = "utf8_error_error_len", since = "1.20.0")]
|
||||
pub fn error_len(&self) -> Option<usize> {
|
||||
self.error_len.map(|len| len as usize)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue