Fix clippy warnings

This commit is contained in:
Alexandre Bury 2021-02-18 21:23:38 -08:00
parent 8e252e176b
commit dd141dd810
2 changed files with 2 additions and 1 deletions

View File

@ -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 {

View File

@ -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<T> {
/// X-axis value
pub x: T,