From 07b97a486f3580f9b50404a4199271f70b4a63fb Mon Sep 17 00:00:00 2001 From: Ethan Brierley Date: Sun, 25 Nov 2018 19:31:35 +0000 Subject: [PATCH] Use a reference rather than take ownership --- src/libcore/num/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 71617347e4c8..56ccea19b8a3 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -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",