janitor: Fix clippy "unneeded return"

This commit is contained in:
Tobias Hunger 2024-06-24 12:39:08 +02:00 committed by Tobias Hunger
parent 87e4cb8951
commit f8e4072d0c
5 changed files with 1 additions and 5 deletions

View file

@ -487,6 +487,5 @@ fn parse_image_url(p: &mut impl Parser) {
}
if !p.expect(SyntaxKind::RParent) {
p.until(SyntaxKind::RParent);
return;
}
}

View file

@ -119,7 +119,6 @@ impl<'a> LocalFocusForwards<'a> {
"only one forward-focus binding can point to an element".into(),
&location,
);
return;
}
});

View file

@ -26,7 +26,6 @@ pub fn lower_component_container(
fn diagnose_component_container(element: &ElementRc, diag: &mut BuildDiagnostics) {
if !element.borrow().children.is_empty() {
diag.push_error("ComponentContainers may not have children".into(), &*element.borrow());
return;
}
}

View file

@ -496,7 +496,6 @@ impl DirtyRegion {
if self.count < Self::MAX_COUNT {
self.rectangles[self.count] = b;
self.count += 1;
return;
} else {
let best_merge = (0..self.count)
.map(|i| (i, self.rectangles[i].union(&b).area() - self.rectangles[i].area()))

View file

@ -537,7 +537,7 @@ impl RendererSealed for FemtoVGRenderer {
if let Some((width, height)) = size.width.try_into().ok().zip(size.height.try_into().ok()) {
self.opengl_context.resize(width, height)?;
};
return Ok(());
Ok(())
}
/// Returns an image buffer of what was rendered last by reading the previous front buffer (using glReadPixels).