Move lights and info tasks to module

This commit is contained in:
2022-09-30 21:17:02 +02:00
parent d2054caf69
commit 62887371c9
5 changed files with 151 additions and 134 deletions

View File

@ -50,16 +50,16 @@ pub enum BulbGroupShape {
impl BulbGroupShape {
pub fn height(&self) -> u32 {
match self {
&Self::Circle { r } => r,
&Self::Rectangle { h, .. } => h,
match *self {
Self::Circle { r } => r,
Self::Rectangle { h, .. } => h,
}
}
pub fn width(&self) -> u32 {
match self {
&Self::Circle { r } => r,
&Self::Rectangle { w, .. } => w,
match *self {
Self::Circle { r } => r,
Self::Rectangle { w, .. } => w,
}
}
}