diff options
author | 2019-11-22 19:36:57 +0100 | |
---|---|---|
committer | 2019-11-22 19:36:57 +0100 | |
commit | a7dba612f03e58d7bd9527499d893987986b347c (patch) | |
tree | b8c3d8f997b714aa368bd6eaecf14065f7645c77 /web/src/widget | |
parent | ba56a561b254c9a5f3d23cb54d23dc311759ab4c (diff) | |
download | iced-a7dba612f03e58d7bd9527499d893987986b347c.tar.gz iced-a7dba612f03e58d7bd9527499d893987986b347c.tar.bz2 iced-a7dba612f03e58d7bd9527499d893987986b347c.zip |
Write docs for `iced` and `iced_native`
Diffstat (limited to 'web/src/widget')
-rw-r--r-- | web/src/widget/text.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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<T: Into<String>>(label: T) -> Self { Text { - content: String::from(label), + content: label.into(), size: None, color: None, font: Font::Default, |