chore(protocol): rename invert to inverted
This commit is contained in:
@@ -13,7 +13,7 @@ pub enum State {
|
||||
}
|
||||
|
||||
impl State {
|
||||
pub const fn invert(self) -> Self {
|
||||
pub const fn inverted(self) -> Self {
|
||||
match self {
|
||||
State::Off => State::On,
|
||||
State::On => State::Off,
|
||||
@@ -95,7 +95,7 @@ where
|
||||
/// Toggle the light by setting it to the inverse of its current state
|
||||
async fn toggle(&mut self) -> Result<(), Self::Error> {
|
||||
let state = self.get_state().await.context(GetStateSnafu)?;
|
||||
self.set_state(state.invert())
|
||||
self.set_state(state.inverted())
|
||||
.await
|
||||
.context(SetStateSnafu)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user