1
0
Fork 0
forked from wry/wry

all: address clippy lints

This commit is contained in:
Julian Orth 2022-08-13 17:46:23 +02:00
parent 0fe59effe2
commit ae991b9038
28 changed files with 84 additions and 70 deletions

View file

@ -1,4 +1,9 @@
#![feature(generic_associated_types)]
#![feature(generic_associated_types, label_break_value)]
#![allow(
clippy::mem_replace_with_default,
clippy::comparison_chain,
clippy::needless_lifetimes
)]
pub mod qoi;
pub mod rect;

View file

@ -7,7 +7,7 @@ use {
};
pub fn union(left: &Container, right: &Container) -> Container {
op::<Union>(left, &right)
op::<Union>(left, right)
}
pub fn subtract(left: &Container, right: &Container) -> Container {
@ -393,11 +393,11 @@ pub fn rects_to_bands(rects_tmp: &[RectRaw]) -> Container {
let mut res = Container::new();
for &[y1, y2] in ys.array_windows_ext::<2>() {
loop {
'bands: {
macro_rules! check_rect {
($rect:expr) => {{
if $rect.y1 != y1 {
break;
break 'bands;
}
rects.pop();
if y2 < $rect.y2 {
@ -422,7 +422,6 @@ pub fn rects_to_bands(rects_tmp: &[RectRaw]) -> Container {
}
res.push(RectRaw { x1, x2, y1, y2 });
}
break;
}
}