Make clippy happy
This commit is contained in:
parent
77c7654589
commit
c32556cfee
1 changed files with 3 additions and 1 deletions
|
|
@ -5,9 +5,11 @@ use std::ops::{Index, Range};
|
||||||
|
|
||||||
/// Utility function to check if a range is empty that works on older rust versions
|
/// Utility function to check if a range is empty that works on older rust versions
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub fn is_empty_range<T: PartialOrd>(range: &Range<T>) -> bool {
|
#[allow(clippy::neg_cmp_op_on_partial_ord)]
|
||||||
|
pub fn is_empty_range<T: PartialOrd<T>>(range: &Range<T>) -> bool {
|
||||||
!(range.start < range.end)
|
!(range.start < range.end)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Indexable<'a, Idx: ?Sized> {
|
pub struct Indexable<'a, Idx: ?Sized> {
|
||||||
lookup: &'a Idx,
|
lookup: &'a Idx,
|
||||||
index: usize,
|
index: usize,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue