Implement From<Color> for Option<Background>
This commit is contained in:
parent
2ce5df0844
commit
1b980bc6e8
1 changed files with 6 additions and 0 deletions
|
|
@ -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))
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue