diff options
author | 2020-08-25 10:54:52 +0200 | |
---|---|---|
committer | 2020-08-25 10:54:52 +0200 | |
commit | 56273c5a3cd60a9722af7015ebc59341a1e75f2c (patch) | |
tree | 82a4d93f2a467078c0b4e16932551a5ef5a02d13 /core | |
parent | 2ce5df084456a92ed1a228738816cf8398b2e918 (diff) | |
parent | f0257949856a9a7edf747684925f85d2ce811198 (diff) | |
download | iced-56273c5a3cd60a9722af7015ebc59341a1e75f2c.tar.gz iced-56273c5a3cd60a9722af7015ebc59341a1e75f2c.tar.bz2 iced-56273c5a3cd60a9722af7015ebc59341a1e75f2c.zip |
Merge pull request #487 from Kaiden42/background
Implement `From<Color>` for `Option<Background>`
Diffstat (limited to 'core')
-rw-r--r-- | core/src/background.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/src/background.rs b/core/src/background.rs index e1a37ddc..cfb95867 100644 --- a/core/src/background.rs +++ b/core/src/background.rs @@ -13,3 +13,9 @@ impl From<Color> for Background { Background::Color(color) } } + +impl From<Color> for Option<Background> { + fn from(color: Color) -> Self { + Some(Background::from(color)) + } +} |