Take Cow in Text::new

This commit is contained in:
Ram.Type-0 2021-11-01 23:59:04 +09:00 committed by Héctor Ramón Jiménez
parent f15bc3ca34
commit ce3b89639d
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
6 changed files with 26 additions and 22 deletions

View file

@ -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}')
}