diff options
| -rw-r--r-- | mumd/src/state.rs | 2 | ||||
| -rw-r--r-- | mumlib/src/error.rs | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/mumd/src/state.rs b/mumd/src/state.rs index d0a7e4b..cdd663d 100644 --- a/mumd/src/state.rs +++ b/mumd/src/state.rs @@ -444,7 +444,7 @@ pub fn handle_command( Command::Events { block } => { if block { warn!("Blocking event list is unimplemented"); - now!(Ok(None)) + now!(Err(Error::Unimplemented)) } else { let events: Vec<_> = state .events diff --git a/mumlib/src/error.rs b/mumlib/src/error.rs index e88bd97..c492a5f 100644 --- a/mumlib/src/error.rs +++ b/mumlib/src/error.rs @@ -11,6 +11,7 @@ pub enum Error { InvalidServerAddr(String, u16), InvalidUsername(String), InvalidServerPassword, + Unimplemented, } impl std::error::Error for Error {} @@ -26,6 +27,7 @@ impl fmt::Display for Error { } Error::InvalidUsername(username) => write!(f, "Invalid username: {}", username), Error::InvalidServerPassword => write!(f, "Invalid server password"), + Error::Unimplemented => write!(f, "Unimplemented"), } } } |
