mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 10:50:00 +00:00
janitor: Fix clippy "unneeded return"
This commit is contained in:
parent
87e4cb8951
commit
f8e4072d0c
5 changed files with 1 additions and 5 deletions
|
@ -487,6 +487,5 @@ fn parse_image_url(p: &mut impl Parser) {
|
|||
}
|
||||
if !p.expect(SyntaxKind::RParent) {
|
||||
p.until(SyntaxKind::RParent);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -119,7 +119,6 @@ impl<'a> LocalFocusForwards<'a> {
|
|||
"only one forward-focus binding can point to an element".into(),
|
||||
&location,
|
||||
);
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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()))
|
||||
|
|
|
@ -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).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue