Implemented From<Color for Background

This commit is contained in:
Malte Veerman 2019-12-04 22:02:07 +01:00
parent ed045b45ba
commit 33ad332ce9
6 changed files with 26 additions and 20 deletions

View file

@ -7,3 +7,9 @@ pub enum Background {
Color(Color),
// TODO: Add gradient and image variants
}
impl From<Color> for Background {
fn from(color: Color) -> Self {
Background::Color(color)
}
}