From 12e3678e558c45e131c6f099f9a1c88818be2b2d Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Mon, 24 Mar 2025 15:29:50 +0800 Subject: [PATCH] description_list: Update `label_width` type to accept any Into. (#729) --- crates/ui/src/description_list.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ui/src/description_list.rs b/crates/ui/src/description_list.rs index 2cdd93f6..53c0fb12 100644 --- a/crates/ui/src/description_list.rs +++ b/crates/ui/src/description_list.rs @@ -140,8 +140,8 @@ impl DescriptionList { /// Set the width of the label, only works for horizontal layout. /// /// Default is `120px`. - pub fn label_width(mut self, label_width: DefiniteLength) -> Self { - self.label_width = label_width; + pub fn label_width(mut self, label_width: impl Into) -> Self { + self.label_width = label_width.into(); self }