From e92ea48e8814b42fc566017db085ca9bdaf3c272 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 5 Dec 2019 01:57:35 +0100 Subject: Make `Button::background` generic --- native/src/widget/button.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'native/src/widget/button.rs') 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>(mut self, background: T) -> Self { + self.background = Some(background.into()); self } -- cgit