diff --git a/library/core/src/str/error.rs b/library/core/src/str/error.rs index 427f720d68c..ccf7b20285c 100644 --- a/library/core/src/str/error.rs +++ b/library/core/src/str/error.rs @@ -72,6 +72,7 @@ impl Utf8Error { /// assert_eq!(1, error.valid_up_to()); /// ``` #[stable(feature = "utf8_error", since = "1.5.0")] + #[inline] pub fn valid_up_to(&self) -> usize { self.valid_up_to } @@ -92,6 +93,7 @@ impl Utf8Error { /// /// [U+FFFD]: ../../std/char/constant.REPLACEMENT_CHARACTER.html #[stable(feature = "utf8_error_error_len", since = "1.20.0")] + #[inline] pub fn error_len(&self) -> Option { self.error_len.map(|len| len as usize) }