Implement From<Color> for Option<Background>
MODIFY
core/src/background.rs
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))
+ }
+}
\ No newline at end of file

Implement From<Color> for Option<Background>