diff options
author | 2020-07-01 07:36:42 +0200 | |
---|---|---|
committer | 2020-07-01 07:36:42 +0200 | |
commit | 75464ad89422884e0718eb0429586a9d77f61c71 (patch) | |
tree | 5456ff6db21375d8b3814e6bb9c4c56649b135e3 /web/src/widget/radio.rs | |
parent | d873c37e31fb052fb376caada6780137e176a6e7 (diff) | |
download | iced-75464ad89422884e0718eb0429586a9d77f61c71.tar.gz iced-75464ad89422884e0718eb0429586a9d77f61c71.tar.bz2 iced-75464ad89422884e0718eb0429586a9d77f61c71.zip |
Use `String::from_str_in` in `iced_web`
Diffstat (limited to '')
-rw-r--r-- | web/src/widget/radio.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/web/src/widget/radio.rs b/web/src/widget/radio.rs index fae67cd8..c9d0a00e 100644 --- a/web/src/widget/radio.rs +++ b/web/src/widget/radio.rs @@ -107,15 +107,16 @@ where _style_sheet: &mut Css<'b>, ) -> dodrio::Node<'b> { use dodrio::builder::*; + use dodrio::bumpalo::collections::String; let radio_label = - bumpalo::format!(in bump, "{}", self.label).into_bump_str(); + String::from_str_in(&self.label, bump).into_bump_str(); let event_bus = bus.clone(); let on_click = self.on_click.clone(); let (label, input) = if let Some(id) = &self.id { - let id = bumpalo::format!(in bump, "{}", id).into_bump_str(); + let id = String::from_str_in(id, bump).into_bump_str(); (label(bump).attr("for", id), input(bump).attr("id", id)) } else { @@ -123,7 +124,7 @@ where }; let input = if let Some(name) = &self.name { - let name = bumpalo::format!(in bump, "{}", name).into_bump_str(); + let name = String::from_str_in(name, bump).into_bump_str(); dodrio::builder::input(bump).attr("name", name) } else { |