diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/CHANGELOG.md | 3 | ||||
-rw-r--r-- | web/src/widget/button.rs | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/web/CHANGELOG.md b/web/CHANGELOG.md index 0bdb9c37..ed02519a 100644 --- a/web/CHANGELOG.md +++ b/web/CHANGELOG.md @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Changed +- `Button::background` takes an `Into<Background>` now instead of a `Background`. + ### Fixed - Render not being scheduled after `Command` futures finishing. diff --git a/web/src/widget/button.rs b/web/src/widget/button.rs index 889c0ab1..4cc8b3de 100644 --- a/web/src/widget/button.rs +++ b/web/src/widget/button.rs @@ -81,8 +81,8 @@ impl<'a, Message> Button<'a, Message> { /// /// [`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 } |