Move lights and info tasks to module

This commit is contained in:
hulthe committed 2022-09-30 21:17:02 +02:00
1 parent d2054caf69
commit 62887371c9
5 files changed
+151 -134

No files matched your search

+6 -6
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,
}
}
}