mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
Update range.rs
Stop creating a reference then immediately dereferencing it.
This commit is contained in:
parent
fd853c00e2
commit
47414aa1bd
@ -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,
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user