summaryrefslogtreecommitdiffstats
path: root/widget/src/helpers.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-12 13:44:03 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-12 13:44:03 +0100
commit66f81c3429c736c5ca17d022ed1d6cdcc15e4f94 (patch)
treed67ce6691961ea7be06ee7ddab811857f699f65c /widget/src/helpers.rs
parent71b9b3c3b1242dd571170fb0f8dd22760a1b4c53 (diff)
downloadiced-66f81c3429c736c5ca17d022ed1d6cdcc15e4f94.tar.gz
iced-66f81c3429c736c5ca17d022ed1d6cdcc15e4f94.tar.bz2
iced-66f81c3429c736c5ca17d022ed1d6cdcc15e4f94.zip
Use closures for `Rule::style`
Diffstat (limited to 'widget/src/helpers.rs')
-rw-r--r--widget/src/helpers.rs8
1 files changed, 4 insertions, 4 deletions
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<Theme>(height: impl Into<Pixels>) -> Rule<Theme>
+pub fn horizontal_rule<'a, Theme>(height: impl Into<Pixels>) -> 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<Theme>(width: impl Into<Pixels>) -> Rule<Theme>
+pub fn vertical_rule<'a, Theme>(width: impl Into<Pixels>) -> Rule<'a, Theme>
where
- Theme: rule::DefaultStyle,
+ Theme: rule::DefaultStyle + 'a,
{
Rule::vertical(width)
}