Use method rather than public field
This commit is contained in:
parent
f1a593d116
commit
11ee29a813
1 changed files with 5 additions and 2 deletions
|
|
@ -4768,8 +4768,7 @@ fn from_str_radix<T: FromStrRadixHelper>(src: &str, radix: u32) -> Result<T, Par
|
|||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub struct ParseIntError {
|
||||
/// Stores the cause of parsing an integer failing
|
||||
pub kind: IntErrorKind,
|
||||
kind: IntErrorKind,
|
||||
}
|
||||
|
||||
/// Enum to store the various types of errors that can cause parsing an integer to fail.
|
||||
|
|
@ -4796,6 +4795,10 @@ pub enum IntErrorKind {
|
|||
}
|
||||
|
||||
impl ParseIntError {
|
||||
/// Outputs the detailed cause of parsing an integer failing.
|
||||
pub fn kind(self) -> IntErrorKind {
|
||||
self.kind
|
||||
}
|
||||
#[unstable(feature = "int_error_internals",
|
||||
reason = "available through Error trait and this method should \
|
||||
not be exposed publicly",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue