diff options
author | 2019-12-05 01:57:35 +0100 | |
---|---|---|
committer | 2019-12-05 01:57:35 +0100 | |
commit | e92ea48e8814b42fc566017db085ca9bdaf3c272 (patch) | |
tree | 48413064237f8b00b4b4c8668a96fc5ca79d995a /native/src/widget | |
parent | f87ddf1056327551b4a2bba9e98cbb7816b6666c (diff) | |
download | iced-e92ea48e8814b42fc566017db085ca9bdaf3c272.tar.gz iced-e92ea48e8814b42fc566017db085ca9bdaf3c272.tar.bz2 iced-e92ea48e8814b42fc566017db085ca9bdaf3c272.zip |
Make `Button::background` generic
Diffstat (limited to 'native/src/widget')
-rw-r--r-- | native/src/widget/button.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/native/src/widget/button.rs b/native/src/widget/button.rs index 023c4ee8..3348c58c 100644 --- a/native/src/widget/button.rs +++ b/native/src/widget/button.rs @@ -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 } |