Fix clippy::semicolon_if_nothing_returned

This commit is contained in:
Héctor Ramón Jiménez 2023-09-20 04:11:52 +02:00
parent 9991052ce5
commit 34f07b6027
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
46 changed files with 108 additions and 108 deletions

View file

@ -293,7 +293,7 @@ where
}
fn diff(&self, tree: &mut Tree) {
self.widget.diff(tree)
self.widget.diff(tree);
}
fn width(&self) -> Length {
@ -418,7 +418,7 @@ where
viewport: &Rectangle,
) {
self.widget
.draw(tree, renderer, theme, style, layout, cursor, viewport)
.draw(tree, renderer, theme, style, layout, cursor, viewport);
}
fn mouse_interaction(
@ -508,7 +508,7 @@ where
) {
self.element
.widget
.operate(state, layout, renderer, operation)
.operate(state, layout, renderer, operation);
}
fn on_event(

View file

@ -95,7 +95,7 @@ impl Linear {
stops: impl IntoIterator<Item = ColorStop>,
) -> Self {
for stop in stops {
self = self.add_stop(stop.offset, stop.color)
self = self.add_stop(stop.offset, stop.color);
}
self

View file

@ -4,7 +4,7 @@ pub struct Hasher(twox_hash::XxHash64);
impl core::hash::Hasher for Hasher {
fn write(&mut self, bytes: &[u8]) {
self.0.write(bytes)
self.0.write(bytes);
}
fn finish(&self) -> u64 {

View file

@ -98,7 +98,7 @@ where
layout: Layout<'_>,
cursor: mouse::Cursor,
) {
self.overlay.draw(renderer, theme, style, layout, cursor)
self.overlay.draw(renderer, theme, style, layout, cursor);
}
/// Applies a [`widget::Operation`] to the [`Element`].
@ -205,7 +205,7 @@ where
state: &mut dyn widget::operation::TextInput,
id: Option<&widget::Id>,
) {
self.operation.text_input(state, id)
self.operation.text_input(state, id);
}
fn custom(&mut self, state: &mut dyn Any, id: Option<&widget::Id>) {
@ -262,7 +262,7 @@ where
layout: Layout<'_>,
cursor: mouse::Cursor,
) {
self.content.draw(renderer, theme, style, layout, cursor)
self.content.draw(renderer, theme, style, layout, cursor);
}
fn is_over(

View file

@ -143,7 +143,7 @@ where
|(child, layout)| {
child.operate(layout, renderer, operation);
},
)
);
});
}

View file

@ -71,7 +71,7 @@ impl<'a, Message> Shell<'a, Message> {
if self.is_layout_invalid {
self.is_layout_invalid = false;
f()
f();
}
}

View file

@ -49,7 +49,7 @@ pub fn focus<T>(target: Id) -> impl Operation<T> {
_bounds: Rectangle,
operate_on_children: &mut dyn FnMut(&mut dyn Operation<T>),
) {
operate_on_children(self)
operate_on_children(self);
}
}
@ -85,7 +85,7 @@ where
_bounds: Rectangle,
operate_on_children: &mut dyn FnMut(&mut dyn Operation<T>),
) {
operate_on_children(self)
operate_on_children(self);
}
fn finish(&self) -> Outcome<T> {
@ -132,7 +132,7 @@ pub fn focus_previous<T>() -> impl Operation<T> {
_bounds: Rectangle,
operate_on_children: &mut dyn FnMut(&mut dyn Operation<T>),
) {
operate_on_children(self)
operate_on_children(self);
}
}
@ -166,7 +166,7 @@ pub fn focus_next<T>() -> impl Operation<T> {
_bounds: Rectangle,
operate_on_children: &mut dyn FnMut(&mut dyn Operation<T>),
) {
operate_on_children(self)
operate_on_children(self);
}
}
@ -193,7 +193,7 @@ pub fn find_focused() -> impl Operation<Id> {
_bounds: Rectangle,
operate_on_children: &mut dyn FnMut(&mut dyn Operation<Id>),
) {
operate_on_children(self)
operate_on_children(self);
}
fn finish(&self) -> Outcome<Id> {

View file

@ -26,7 +26,7 @@ pub fn snap_to<T>(target: Id, offset: RelativeOffset) -> impl Operation<T> {
_bounds: Rectangle,
operate_on_children: &mut dyn FnMut(&mut dyn Operation<T>),
) {
operate_on_children(self)
operate_on_children(self);
}
fn scrollable(
@ -60,7 +60,7 @@ pub fn scroll_to<T>(target: Id, offset: AbsoluteOffset) -> impl Operation<T> {
_bounds: Rectangle,
operate_on_children: &mut dyn FnMut(&mut dyn Operation<T>),
) {
operate_on_children(self)
operate_on_children(self);
}
fn scrollable(

View file

@ -38,7 +38,7 @@ pub fn move_cursor_to_front<T>(target: Id) -> impl Operation<T> {
_bounds: Rectangle,
operate_on_children: &mut dyn FnMut(&mut dyn Operation<T>),
) {
operate_on_children(self)
operate_on_children(self);
}
}
@ -68,7 +68,7 @@ pub fn move_cursor_to_end<T>(target: Id) -> impl Operation<T> {
_bounds: Rectangle,
operate_on_children: &mut dyn FnMut(&mut dyn Operation<T>),
) {
operate_on_children(self)
operate_on_children(self);
}
}
@ -99,7 +99,7 @@ pub fn move_cursor_to<T>(target: Id, position: usize) -> impl Operation<T> {
_bounds: Rectangle,
operate_on_children: &mut dyn FnMut(&mut dyn Operation<T>),
) {
operate_on_children(self)
operate_on_children(self);
}
}
@ -128,7 +128,7 @@ pub fn select_all<T>(target: Id) -> impl Operation<T> {
_bounds: Rectangle,
operate_on_children: &mut dyn FnMut(&mut dyn Operation<T>),
) {
operate_on_children(self)
operate_on_children(self);
}
}

View file

@ -61,7 +61,7 @@ impl Tree {
Renderer: crate::Renderer,
{
if self.tag == new.borrow().tag() {
new.borrow().diff(self)
new.borrow().diff(self);
} else {
*self = Self::new(new);
}
@ -78,7 +78,7 @@ impl Tree {
new_children,
|tree, widget| tree.diff(widget.borrow()),
|widget| Self::new(widget.borrow()),
)
);
}
/// Reconciliates the children of the tree with the provided list of widgets using custom