Simplify update signature in text_input
This commit is contained in:
parent
891b917576
commit
54c9815b7b
2 changed files with 3 additions and 3 deletions
|
|
@ -237,7 +237,7 @@ pub fn update<'a, Message, Renderer>(
|
||||||
font: &Renderer::Font,
|
font: &Renderer::Font,
|
||||||
is_secure: bool,
|
is_secure: bool,
|
||||||
on_change: &dyn Fn(String) -> Message,
|
on_change: &dyn Fn(String) -> Message,
|
||||||
on_paste: &Option<Box<dyn Fn(String) -> Message + 'a>>,
|
on_paste: Option<&dyn Fn(String) -> Message>,
|
||||||
on_submit: &Option<Message>,
|
on_submit: &Option<Message>,
|
||||||
state: impl FnOnce() -> &'a mut State,
|
state: impl FnOnce() -> &'a mut State,
|
||||||
) -> event::Status
|
) -> event::Status
|
||||||
|
|
@ -821,7 +821,7 @@ where
|
||||||
&self.font,
|
&self.font,
|
||||||
self.is_secure,
|
self.is_secure,
|
||||||
self.on_change.as_ref(),
|
self.on_change.as_ref(),
|
||||||
&self.on_paste,
|
self.on_paste.as_deref(),
|
||||||
&self.on_submit,
|
&self.on_submit,
|
||||||
|| &mut self.state,
|
|| &mut self.state,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -227,7 +227,7 @@ where
|
||||||
&self.font,
|
&self.font,
|
||||||
self.is_secure,
|
self.is_secure,
|
||||||
self.on_change.as_ref(),
|
self.on_change.as_ref(),
|
||||||
&self.on_paste,
|
self.on_paste.as_deref(),
|
||||||
&self.on_submit,
|
&self.on_submit,
|
||||||
|| tree.state.downcast_mut::<text_input::State>(),
|
|| tree.state.downcast_mut::<text_input::State>(),
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue