Use String::from_str_in in iced_web
This commit is contained in:
parent
d873c37e31
commit
75464ad894
6 changed files with 67 additions and 40 deletions
|
|
@ -116,7 +116,12 @@ impl<'a, Message> Widget<Message> for Text {
|
|||
) -> dodrio::Node<'b> {
|
||||
use dodrio::builder::*;
|
||||
|
||||
let content = bumpalo::format!(in bump, "{}", self.content);
|
||||
let content = {
|
||||
use dodrio::bumpalo::collections::String;
|
||||
|
||||
String::from_str_in(&self.content, bump)
|
||||
};
|
||||
|
||||
let color = self
|
||||
.color
|
||||
.map(css::color)
|
||||
|
|
@ -133,7 +138,8 @@ impl<'a, Message> Widget<Message> for Text {
|
|||
|
||||
let style = bumpalo::format!(
|
||||
in bump,
|
||||
"width: {}; height: {}; font-size: {}px; color: {}; text-align: {}; font-family: {}",
|
||||
"width: {}; height: {}; font-size: {}px; color: {}; \
|
||||
text-align: {}; font-family: {}",
|
||||
width,
|
||||
height,
|
||||
self.size.unwrap_or(20),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue