From a7dba612f03e58d7bd9527499d893987986b347c Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 22 Nov 2019 19:36:57 +0100 Subject: Write docs for `iced` and `iced_native` --- web/src/widget/text.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web/src/widget') diff --git a/web/src/widget/text.rs b/web/src/widget/text.rs index 3740af13..1183a3cd 100644 --- a/web/src/widget/text.rs +++ b/web/src/widget/text.rs @@ -30,9 +30,9 @@ impl Text { /// Create a new fragment of [`Text`] with the given contents. /// /// [`Text`]: struct.Text.html - pub fn new(label: &str) -> Self { + pub fn new>(label: T) -> Self { Text { - content: String::from(label), + content: label.into(), size: None, color: None, font: Font::Default, -- cgit