Skip to content

Commit

Permalink
Update range.rs
Browse files Browse the repository at this point in the history
Stop creating a reference then immediately dereferencing it.
  • Loading branch information
frogtd committed Jul 27, 2021
1 parent fd853c0 commit 47414aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions library/core/src/ops/range.rs
Expand Up @@ -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,
})
}
Expand Down

0 comments on commit 47414aa

Please sign in to comment.