Use then_some instead of then in checkbox example
This commit is contained in:
parent
d0e94419b5
commit
dfe1780128
1 changed files with 1 additions and 1 deletions
|
|
@ -66,7 +66,7 @@ impl Application for Example {
|
|||
|
||||
let styled_checkbox = |label, style| {
|
||||
checkbox(label, self.styled)
|
||||
.on_toggle_maybe(self.default.then(|| Message::StyledToggled))
|
||||
.on_toggle_maybe(self.default.then_some(Message::StyledToggled))
|
||||
.style(style)
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue