Move lights and info tasks to module
This commit is contained in:
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user