Skip to content

Commit 4ae5296

Browse files
authored
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.
2 parents 1682382 + 47414aa commit 4ae5296

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

library/core/src/ops/range.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -812,12 +812,12 @@ pub trait RangeBounds<T: ?Sized> {
812812
U: ?Sized + PartialOrd<T>,
813813
{
814814
(match self.start_bound() {
815-
Included(ref start) => *start <= item,
816-
Excluded(ref start) => *start < item,
815+
Included(start) => start <= item,
816+
Excluded(start) => start < item,
817817
Unbounded => true,
818818
}) && (match self.end_bound() {
819-
Included(ref end) => item <= *end,
820-
Excluded(ref end) => item < *end,
819+
Included(end) => item <= end,
820+
Excluded(end) => item < end,
821821
Unbounded => true,
822822
})
823823
}

0 commit comments

Comments
 (0)