Implement From<Color> for Option<Background>

This commit is contained in:
Kaiden42 2020-08-19 01:30:22 +02:00 committed by Héctor Ramón Jiménez
parent 2ce5df0844
commit 1b980bc6e8

View File

@ -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))
}
}