Simplify on_toggle_maybe for Checkbox
This commit is contained in:
parent
4afe1c7111
commit
faeb4536b3
1 changed files with 1 additions and 2 deletions
|
|
@ -116,8 +116,7 @@ where
|
|||
where
|
||||
F: Fn(bool) -> Message + 'a,
|
||||
{
|
||||
self.on_toggle =
|
||||
f.map(|f| Box::new(f) as Box<dyn Fn(bool) -> Message + 'a>);
|
||||
self.on_toggle = f.map(|f| Box::new(f) as _);
|
||||
self
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue