We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad268bd commit 7a25123Copy full SHA for 7a25123
library/core/src/str/error.rs
@@ -72,6 +72,7 @@ impl Utf8Error {
72
/// assert_eq!(1, error.valid_up_to());
73
/// ```
74
#[stable(feature = "utf8_error", since = "1.5.0")]
75
+ #[inline]
76
pub fn valid_up_to(&self) -> usize {
77
self.valid_up_to
78
}
@@ -92,6 +93,7 @@ impl Utf8Error {
92
93
///
94
/// [U+FFFD]: ../../std/char/constant.REPLACEMENT_CHARACTER.html
95
#[stable(feature = "utf8_error_error_len", since = "1.20.0")]
96
97
pub fn error_len(&self) -> Option<usize> {
98
self.error_len.map(|len| len as usize)
99
0 commit comments