From 47414aa1bd0e4dc3bd8ef06dcea6b85e510d0912 Mon Sep 17 00:00:00 2001 From: frogtd <31412003+frogtd@users.noreply.github.com> Date: Tue, 27 Jul 2021 16:14:48 -0400 Subject: [PATCH] Update range.rs Stop creating a reference then immediately dereferencing it. --- library/core/src/ops/range.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/core/src/ops/range.rs b/library/core/src/ops/range.rs index 9bf0382312e..347a346359f 100644 --- a/library/core/src/ops/range.rs +++ b/library/core/src/ops/range.rs @@ -812,12 +812,12 @@ pub trait RangeBounds { U: ?Sized + PartialOrd, { (match self.start_bound() { - Included(ref start) => *start <= item, - Excluded(ref start) => *start < item, + Included(start) => start <= item, + Excluded(start) => start < item, Unbounded => true, }) && (match self.end_bound() { - Included(ref end) => item <= *end, - Excluded(ref end) => item < *end, + Included(end) => item <= end, + Excluded(end) => item < end, Unbounded => true, }) }