Skip to content

Commit 47414aa

Browse files
authored
Update range.rs
Stop creating a reference then immediately dereferencing it.
1 parent fd853c0 commit 47414aa

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)