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>;
|
fn view(&self, state: &Self::State) -> Element<'_, Self::Event, Renderer>;
|
||||||
|
|
||||||
/// Update the [`Component`] state based on the provided [`Operation`](widget::Operation)
|
/// Update the [`Component`] state based on the provided [`Operation`](widget::Operation)
|
||||||
|
///
|
||||||
|
/// By default, it does nothing.
|
||||||
fn operate(
|
fn operate(
|
||||||
&self,
|
&self,
|
||||||
#[allow(unused)] state: &mut Self::State,
|
_state: &mut Self::State,
|
||||||
#[allow(unused)] operation: &mut dyn widget::Operation<Message>,
|
_operation: &mut dyn widget::Operation<Message>,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue