Prefix _ instead of allow(unused) in Component trait
This commit is contained in:
parent
8d5fba8a1f
commit
cec28e2ef5
1 changed files with 4 additions and 2 deletions
|
|
@ -48,10 +48,12 @@ pub trait Component<Message, Renderer> {
|
|||
fn view(&self, state: &Self::State) -> Element<'_, Self::Event, Renderer>;
|
||||
|
||||
/// Update the [`Component`] state based on the provided [`Operation`](widget::Operation)
|
||||
///
|
||||
/// By default, it does nothing.
|
||||
fn operate(
|
||||
&self,
|
||||
#[allow(unused)] state: &mut Self::State,
|
||||
#[allow(unused)] operation: &mut dyn widget::Operation<Message>,
|
||||
_state: &mut Self::State,
|
||||
_operation: &mut dyn widget::Operation<Message>,
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue