summaryrefslogtreecommitdiffstats
path: root/web/src/widget/checkbox.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-07-01 07:36:42 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-07-01 07:36:42 +0200
commit75464ad89422884e0718eb0429586a9d77f61c71 (patch)
tree5456ff6db21375d8b3814e6bb9c4c56649b135e3 /web/src/widget/checkbox.rs
parentd873c37e31fb052fb376caada6780137e176a6e7 (diff)
downloadiced-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/checkbox.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/web/src/widget/checkbox.rs b/web/src/widget/checkbox.rs
index 4d0c7c17..21801e39 100644
--- a/web/src/widget/checkbox.rs
+++ b/web/src/widget/checkbox.rs
@@ -94,9 +94,10 @@ where
style_sheet: &mut Css<'b>,
) -> dodrio::Node<'b> {
use dodrio::builder::*;
+ use dodrio::bumpalo::collections::String;
let checkbox_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_toggle = self.on_toggle.clone();
@@ -107,7 +108,7 @@ where
let spacing_class = style_sheet.insert(bump, css::Rule::Spacing(5));
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 {