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, }) }