Skip to content

Commit

Permalink
+ Add #[must_use] to const fns
Browse files Browse the repository at this point in the history
  • Loading branch information
chrivers committed Feb 4, 2025
1 parent 08a8ff2 commit 119c41f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/hue/api/light.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ pub enum LightPowerupOn {
}

impl LightPowerupOn {
#[must_use]
pub const fn is_none(&self) -> bool {
matches!(self, Self::None)
}
Expand All @@ -361,6 +362,7 @@ pub enum LightPowerupColor {
}

impl LightPowerupColor {
#[must_use]
pub const fn is_none(&self) -> bool {
matches!(self, Self::None)
}
Expand All @@ -378,6 +380,7 @@ pub enum LightPowerupDimming {
}

impl LightPowerupDimming {
#[must_use]
pub const fn is_none(&self) -> bool {
matches!(self, Self::None)
}
Expand Down

0 comments on commit 119c41f

Please sign in to comment.