Skip to content

Commit

Permalink
make name of tree argument in Widget consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
edwloef committed Nov 28, 2024
1 parent eba1d40 commit 6883dd7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions core/src/widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,20 +103,20 @@ where
/// Applies an [`Operation`] to the [`Widget`].
fn operate(
&self,
state: &mut Tree,
tree: &mut Tree,
layout: Layout<'_>,
renderer: &Renderer,
operation: &mut dyn Operation,
) {
let _ = (state, layout, renderer, operation);
let _ = (tree, layout, renderer, operation);
}

/// Processes a runtime [`Event`].
///
/// By default, it does nothing.
fn update(
&mut self,
state: &mut Tree,
tree: &mut Tree,
event: Event,
layout: Layout<'_>,
cursor: mouse::Cursor,
Expand All @@ -126,7 +126,7 @@ where
viewport: &Rectangle,
) {
let _ = (
state, event, layout, cursor, renderer, clipboard, shell, viewport,
tree, event, layout, cursor, renderer, clipboard, shell, viewport,
);
}

Expand All @@ -135,26 +135,26 @@ where
/// By default, it returns [`mouse::Interaction::Idle`].
fn mouse_interaction(
&self,
state: &Tree,
tree: &Tree,
layout: Layout<'_>,
cursor: mouse::Cursor,
viewport: &Rectangle,
renderer: &Renderer,
) -> mouse::Interaction {
let _ = (state, layout, cursor, viewport, renderer);
let _ = (tree, layout, cursor, viewport, renderer);

mouse::Interaction::None
}

/// Returns the overlay of the [`Widget`], if there is any.
fn overlay<'a>(
&'a mut self,
state: &'a mut Tree,
tree: &'a mut Tree,
layout: Layout<'_>,
renderer: &Renderer,
translation: Vector,
) -> Option<overlay::Element<'a, Message, Theme, Renderer>> {
let _ = (state, layout, renderer, translation);
let _ = (tree, layout, renderer, translation);

None
}
Expand Down

0 comments on commit 6883dd7

Please sign in to comment.