about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2021-07-28 18:28:22 +0900
committerGitHub <noreply@github.com>2021-07-28 18:28:22 +0900
commit4ae529688a5166f7a7cc5366b95599893e232c91 (patch)
tree5ceb08c4bc0cd781fa2994208e960f7644c78f41
parent168238246fa6a6aa1da7e38d38a1977a96f43430 (diff)
parent47414aa1bd0e4dc3bd8ef06dcea6b85e510d0912 (diff)
downloadrust-4ae529688a5166f7a7cc5366b95599893e232c91.tar.gz
rust-4ae529688a5166f7a7cc5366b95599893e232c91.zip
Rollup merge of #87523 - frogtd:patch-2, r=dtolnay
Stop creating a reference then immediately dereferencing it.

Stop creating a reference then immediately dereferencing it.
-rw-r--r--library/core/src/ops/range.rs8
1 files 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<T: ?Sized> {
         U: ?Sized + PartialOrd<T>,
     {
         (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,
         })
     }