From 43a7ad72ef070929278e6d03d98077ac267fe2a6 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 11 Feb 2022 18:42:15 +0700 Subject: Expose function helpers to build widgets in `pure::widget` `button("Hello")` is easier to write and read than `Button::new("Hello")`. --- pure/src/widget/text.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pure/src/widget/text.rs') diff --git a/pure/src/widget/text.rs b/pure/src/widget/text.rs index e3a7d299..73ff71e2 100644 --- a/pure/src/widget/text.rs +++ b/pure/src/widget/text.rs @@ -24,9 +24,9 @@ where impl Text { /// Create a new fragment of [`Text`] with the given contents. - pub fn new>(label: T) -> Self { + pub fn new(label: T) -> Self { Text { - content: label.into(), + content: label.to_string(), size: None, color: None, font: Default::default(), -- cgit