From c32556cfee8b77162a66e7dfe062ed490a8498e7 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Sun, 21 Feb 2021 15:52:05 +0100 Subject: [PATCH] Make clippy happy --- src/algorithms/utils.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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,