veloren/client/src/error.rs

18 lines
340 B
Rust
Raw Normal View History

use common::net::PostError;
#[derive(Debug)]
pub enum Error {
Network(PostError),
ServerShutdown,
Other(String),
}
impl From<PostError> for Error {
fn from(err: PostError) -> Self {
match err {
PostError::Disconnected => Error::ServerShutdown,
err => Error::Network(err),
}
}
}