From ce3b89639d84a279bbc0f4dac912a136488d0bec Mon Sep 17 00:00:00 2001 From: "Ram.Type-0" Date: Mon, 1 Nov 2021 23:59:04 +0900 Subject: Take `Cow` in `Text::new` --- examples/todos/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/todos/src') diff --git a/examples/todos/src/main.rs b/examples/todos/src/main.rs index bb00aac6..bddc0e71 100644 --- a/examples/todos/src/main.rs +++ b/examples/todos/src/main.rs @@ -469,7 +469,7 @@ const ICONS: Font = Font::External { bytes: include_bytes!("../../todos/fonts/icons.ttf"), }; -fn icon(unicode: char) -> Text { +fn icon(unicode: char) -> Text<'static> { text(unicode.to_string()) .font(ICONS) .width(Length::Units(20)) @@ -477,11 +477,11 @@ fn icon(unicode: char) -> Text { .size(20) } -fn edit_icon() -> Text { +fn edit_icon() -> Text<'static> { icon('\u{F303}') } -fn delete_icon() -> Text { +fn delete_icon() -> Text<'static> { icon('\u{F1F8}') } -- cgit