diff --git a/src/algorithms/utils.rs b/src/algorithms/utils.rs index 3071586..70af0c9 100644 --- a/src/algorithms/utils.rs +++ b/src/algorithms/utils.rs @@ -5,9 +5,11 @@ use std::ops::{Index, Range}; /// Utility function to check if a range is empty that works on older rust versions #[inline(always)] -pub fn is_empty_range(range: &Range) -> bool { +#[allow(clippy::neg_cmp_op_on_partial_ord)] +pub fn is_empty_range>(range: &Range) -> bool { !(range.start < range.end) } + pub struct Indexable<'a, Idx: ?Sized> { lookup: &'a Idx, index: usize,