From 66f81c3429c736c5ca17d022ed1d6cdcc15e4f94 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 12 Mar 2024 13:44:03 +0100 Subject: Use closures for `Rule::style` --- widget/src/helpers.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'widget/src/helpers.rs') diff --git a/widget/src/helpers.rs b/widget/src/helpers.rs index 91d5ee80..4bff0f16 100644 --- a/widget/src/helpers.rs +++ b/widget/src/helpers.rs @@ -315,9 +315,9 @@ pub fn vertical_space() -> Space { /// Creates a horizontal [`Rule`] with the given height. /// /// [`Rule`]: crate::Rule -pub fn horizontal_rule(height: impl Into) -> Rule +pub fn horizontal_rule<'a, Theme>(height: impl Into) -> Rule<'a, Theme> where - Theme: rule::DefaultStyle, + Theme: rule::DefaultStyle + 'a, { Rule::horizontal(height) } @@ -325,9 +325,9 @@ where /// Creates a vertical [`Rule`] with the given width. /// /// [`Rule`]: crate::Rule -pub fn vertical_rule(width: impl Into) -> Rule +pub fn vertical_rule<'a, Theme>(width: impl Into) -> Rule<'a, Theme> where - Theme: rule::DefaultStyle, + Theme: rule::DefaultStyle + 'a, { Rule::vertical(width) } -- cgit