Use closures for Rule::style
This commit is contained in:
parent
71b9b3c3b1
commit
66f81c3429
2 changed files with 23 additions and 22 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue