summaryrefslogtreecommitdiffstats
path: root/native/src/widget/text.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-07-27 06:56:09 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-07-27 06:56:09 +0200
commita1c5f8839dd972a016e4fd6af3a898c1d8f2684f (patch)
tree0ea76f642a6d7fa6abc98f081faa5db572ec2759 /native/src/widget/text.rs
parentff2519b1d43d481987351a83b6dd7237524c21f0 (diff)
downloadiced-a1c5f8839dd972a016e4fd6af3a898c1d8f2684f.tar.gz
iced-a1c5f8839dd972a016e4fd6af3a898c1d8f2684f.tar.bz2
iced-a1c5f8839dd972a016e4fd6af3a898c1d8f2684f.zip
Use `ToString` for `Text::new` instead of `Into<String>`
Diffstat (limited to '')
-rw-r--r--native/src/widget/text.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/native/src/widget/text.rs b/native/src/widget/text.rs
index 26386505..b30f4518 100644
--- a/native/src/widget/text.rs
+++ b/native/src/widget/text.rs
@@ -45,9 +45,9 @@ where
Renderer::Theme: StyleSheet,
{
/// Create a new fragment of [`Text`] with the given contents.
- pub fn new<T: Into<String>>(label: T) -> Self {
+ pub fn new<T: ToString>(label: T) -> Self {
Text {
- content: label.into(),
+ content: label.to_string(),
size: None,
font: Default::default(),
width: Length::Shrink,