Fix format
This commit is contained in:
parent
e00fca6372
commit
2a5aa69024
|
@ -43,7 +43,11 @@ impl<Message> Toggler<Message> {
|
|||
/// `Message`.
|
||||
///
|
||||
/// [`Toggler`]: struct.Toggler.html
|
||||
pub fn new<F>(is_active: bool, label: impl Into<Option<String>>, f: F) -> Self
|
||||
pub fn new<F>(
|
||||
is_active: bool,
|
||||
label: impl Into<Option<String>>,
|
||||
f: F,
|
||||
) -> Self
|
||||
where
|
||||
F: 'static + Fn(bool) -> Message,
|
||||
{
|
||||
|
@ -95,9 +99,10 @@ where
|
|||
use dodrio::builder::*;
|
||||
use dodrio::bumpalo::collections::String;
|
||||
|
||||
let toggler_label = &self.label.as_ref().map(|label| {
|
||||
String::from_str_in(&label, bump).into_bump_str()
|
||||
});
|
||||
let toggler_label = &self
|
||||
.label
|
||||
.as_ref()
|
||||
.map(|label| String::from_str_in(&label, bump).into_bump_str());
|
||||
|
||||
let event_bus = bus.clone();
|
||||
let on_toggle = self.on_toggle.clone();
|
||||
|
@ -125,9 +130,7 @@ where
|
|||
})
|
||||
.finish();
|
||||
|
||||
let toggler = span(bump)
|
||||
.children(vec![span(bump).finish()])
|
||||
.finish();
|
||||
let toggler = span(bump).children(vec![span(bump).finish()]).finish();
|
||||
|
||||
label
|
||||
.attr(
|
||||
|
|
Loading…
Reference in New Issue