From dd141dd810359a160bf936fa4e8d52bcce86b068 Mon Sep 17 00:00:00 2001 From: Alexandre Bury Date: Thu, 18 Feb 2021 21:23:38 -0800 Subject: [PATCH] Fix clippy warnings --- cursive-core/src/view/scroll/core.rs | 2 +- cursive-core/src/xy.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cursive-core/src/view/scroll/core.rs b/cursive-core/src/view/scroll/core.rs index 0a29281..a4d519d 100644 --- a/cursive-core/src/view/scroll/core.rs +++ b/cursive-core/src/view/scroll/core.rs @@ -618,7 +618,7 @@ impl Core { XY::zip4(Orientation::pair(), position, lengths, offsets) .keep(grabbed.and(self.enabled)) .into_iter() - .filter_map(|x| x) + .flatten() .next() { if pos >= offset && pos < offset + length { diff --git a/cursive-core/src/xy.rs b/cursive-core/src/xy.rs index e459834..08d5892 100644 --- a/cursive-core/src/xy.rs +++ b/cursive-core/src/xy.rs @@ -3,6 +3,7 @@ use std::iter; /// A generic structure with a value for each axis. #[derive(Debug, Default, Clone, Copy, PartialEq, Eq, Hash)] +#[allow(clippy::upper_case_acronyms)] pub struct XY { /// X-axis value pub x: T,