summaryrefslogtreecommitdiffstats
path: root/pure/src/helpers.rs
diff options
context:
space:
mode:
Diffstat (limited to 'pure/src/helpers.rs')
-rw-r--r--pure/src/helpers.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/pure/src/helpers.rs b/pure/src/helpers.rs
index 9a8a29c1..2b5ac823 100644
--- a/pure/src/helpers.rs
+++ b/pure/src/helpers.rs
@@ -202,14 +202,22 @@ pub fn vertical_space(height: Length) -> widget::Space {
/// Creates a horizontal [`Rule`] with the given height.
///
/// [`Rule`]: widget::Rule
-pub fn horizontal_rule<'a>(height: u16) -> widget::Rule<'a> {
+pub fn horizontal_rule<Renderer>(height: u16) -> widget::Rule<Renderer>
+where
+ Renderer: iced_native::Renderer,
+ Renderer::Theme: widget::rule::StyleSheet,
+{
widget::Rule::horizontal(height)
}
/// Creates a vertical [`Rule`] with the given width.
///
/// [`Rule`]: widget::Rule
-pub fn vertical_rule<'a>(width: u16) -> widget::Rule<'a> {
+pub fn vertical_rule<Renderer>(width: u16) -> widget::Rule<Renderer>
+where
+ Renderer: iced_native::Renderer,
+ Renderer::Theme: widget::rule::StyleSheet,
+{
widget::Rule::vertical(width)
}