summaryrefslogtreecommitdiffstats
path: root/web/src/widget
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-11-22 19:36:57 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-11-22 19:36:57 +0100
commita7dba612f03e58d7bd9527499d893987986b347c (patch)
treeb8c3d8f997b714aa368bd6eaecf14065f7645c77 /web/src/widget
parentba56a561b254c9a5f3d23cb54d23dc311759ab4c (diff)
downloadiced-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.rs4
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,