diff options
author | Manish Goregaokar <manishsmail@gmail.com> | 2017-01-06 20:44:51 -0800 |
---|---|---|
committer | Manish Goregaokar <manishsmail@gmail.com> | 2017-01-06 20:44:51 -0800 |
commit | 4e1f4c8cd7180606156b71ad0222f60e4559f2b3 (patch) | |
tree | 28d7a983f5639270976de1f794cc54cb349ea4a8 /src/index.rs | |
parent | 49187d53f2f8b7cfca9105c3fb00d7c29e2a457b (diff) | |
download | alacritty-4e1f4c8cd7180606156b71ad0222f60e4559f2b3.tar.gz alacritty-4e1f4c8cd7180606156b71ad0222f60e4559f2b3.zip |
Clippy fixes!
Diffstat (limited to 'src/index.rs')
-rw-r--r-- | src/index.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/index.rs b/src/index.rs index 21ce0df5..25d5eaff 100644 --- a/src/index.rs +++ b/src/index.rs @@ -44,7 +44,7 @@ impl Ord for Point { use std::cmp::Ordering::*; match (self.line.cmp(&other.line), self.col.cmp(&other.col)) { (Equal, Equal) => Equal, - (Equal, ord) => ord, + (Equal, ord) | (ord, Equal) => ord, (Less, _) => Less, (Greater, _) => Greater, @@ -314,7 +314,7 @@ impl<T: PartialOrd<T>> Contains for Range<T> { impl<T: PartialOrd<T>> Contains for RangeInclusive<T> { type Content = T; fn contains_(&self, item: Self::Content) -> bool { - if let &RangeInclusive::NonEmpty{ref start, ref end} = self { + if let RangeInclusive::NonEmpty{ref start, ref end} = *self { (*start <= item) && (item <= *end) } else { false } } |