Make Button::background generic
This commit is contained in:
parent
f87ddf1056
commit
e92ea48e88
7 changed files with 21 additions and 20 deletions
|
|
@ -89,8 +89,8 @@ impl<'a, Message, Renderer> Button<'a, Message, Renderer> {
|
|||
///
|
||||
/// [`Button`]: struct.Button.html
|
||||
/// [`Background`]: ../../struct.Background.html
|
||||
pub fn background(mut self, background: Background) -> Self {
|
||||
self.background = Some(background);
|
||||
pub fn background<T: Into<Background>>(mut self, background: T) -> Self {
|
||||
self.background = Some(background.into());
|
||||
self
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue