Use a reference rather than take ownership

This commit is contained in:
Ethan Brierley 2018-11-25 19:31:35 +00:00
parent 51e1f5560d
commit 07b97a486f

View File

@ -4800,7 +4800,7 @@ impl ParseIntError {
reason = "it can be useful to match errors when making error messages \
for integer parsing",
issue = "22639")]
pub fn kind(self) -> IntErrorKind {
pub fn kind(&self) -> &IntErrorKind {
self.kind
}
#[unstable(feature = "int_error_internals",