diff --git a/algorithms/src/rect/region.rs b/algorithms/src/rect/region.rs index 863a08c3..4c286471 100644 --- a/algorithms/src/rect/region.rs +++ b/algorithms/src/rect/region.rs @@ -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>() { - 'bands: { + loop { macro_rules! check_rect { ($rect:expr) => {{ if $rect.y1 != y1 { - break 'bands; + break; } rects.pop(); if y2 < $rect.y2 { @@ -422,6 +422,7 @@ pub fn rects_to_bands(rects_tmp: &[RectRaw]) -> Container { } res.push(RectRaw { x1, x2, y1, y2 }); } + break; } }