make enum reading from the db more robust

This commit is contained in:
dignifiedquire
2019-09-08 11:29:40 +02:00
parent d07ef01204
commit 00e5ddd6f0
5 changed files with 52 additions and 21 deletions

View File

@@ -38,6 +38,12 @@ pub enum MessageState {
OutMdnRcvd = 28,
}
impl Default for MessageState {
fn default() -> Self {
MessageState::Undefined
}
}
impl From<MessageState> for LotState {
fn from(s: MessageState) -> Self {
use MessageState::*;