chore(home-assistant): rename HomeAssistantState::UnexpectedErr to Unexpected because I was expecting it to contain an error type returning to the project after so long

This commit is contained in:
2026-07-14 21:29:50 -04:00
parent 17fabbf178
commit 38c30d87d0
2 changed files with 4 additions and 4 deletions

View File

@@ -30,7 +30,7 @@ impl GetState for HomeAssistantLight {
HomeAssistantState::Err(error_state) => {
Err(GetStateError::Error { state: error_state })
}
HomeAssistantState::UnexpectedErr(state) => {
HomeAssistantState::Unexpected(state) => {
Err(GetStateError::UnexpectedError { state })
}
}

View File

@@ -12,7 +12,7 @@ pub use unexpected_state::UnexpectedState;
pub enum HomeAssistantState<State> {
Ok(State),
Err(ErrorState),
UnexpectedErr(UnexpectedState),
Unexpected(UnexpectedState),
}
impl<State> From<String> for HomeAssistantState<State>
@@ -28,7 +28,7 @@ where
return HomeAssistantState::Err(error);
}
HomeAssistantState::UnexpectedErr(UnexpectedState(s.into()))
HomeAssistantState::Unexpected(UnexpectedState(s.into()))
}
}
@@ -44,6 +44,6 @@ impl<State: FromStr> FromStr for HomeAssistantState<State> {
return Ok(HomeAssistantState::Err(error));
}
Ok(HomeAssistantState::UnexpectedErr(UnexpectedState(s.into())))
Ok(HomeAssistantState::Unexpected(UnexpectedState(s.into())))
}
}