From 4081e2b19257378ef6c454f2e3abe57f25a2f088 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 13 Sep 2024 01:08:23 +0200 Subject: Take `Into` in `TextEditor::width` Since a `Shrink` width would not make sense. --- widget/src/text_editor.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'widget') diff --git a/widget/src/text_editor.rs b/widget/src/text_editor.rs index 0029bc87..7e2a30f1 100644 --- a/widget/src/text_editor.rs +++ b/widget/src/text_editor.rs @@ -110,8 +110,8 @@ where } /// Sets the width of the [`TextEditor`]. - pub fn width(mut self, width: impl Into) -> Self { - self.width = width.into(); + pub fn width(mut self, width: impl Into) -> Self { + self.width = Length::from(width.into()); self } -- cgit