From f42442b6e07a8eafc711d708bb70d6065b4f8c5d Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Wed, 29 Aug 2018 08:59:38 -0500 Subject: [PATCH] dont deref --- clippy_lints/src/ptr_offset_with_cast.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/ptr_offset_with_cast.rs b/clippy_lints/src/ptr_offset_with_cast.rs index 6f589a7d1d7..9f475473c61 100644 --- a/clippy_lints/src/ptr_offset_with_cast.rs +++ b/clippy_lints/src/ptr_offset_with_cast.rs @@ -134,7 +134,7 @@ enum Method { impl Method { fn suggestion(self) -> &'static str { - match *self { + match self { Method::Offset => "add", Method::WrappingOffset => "wrapping_add", } @@ -143,7 +143,7 @@ impl Method { impl fmt::Display for Method { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match *self { + match self { Method::Offset => write!(f, "offset"), Method::WrappingOffset => write!(f, "wrapping_offset"), }