Add necessary error variant

master
Paul Woolcock 6 years ago
parent e7afdf7b59
commit 3f7841da02
  1. 3
      src/errors.rs
  2. 1
      src/lib.rs

@ -37,6 +37,8 @@ pub enum Error {
Client(StatusCode),
/// Generic server error.
Server(StatusCode),
/// MastodonBuilder error.
DataMissing,
}
impl fmt::Display for Error {
@ -63,6 +65,7 @@ impl error::Error for Error {
Error::ClientIdRequired => "ClientIdRequired",
Error::ClientSecretRequired => "ClientSecretRequired",
Error::AccessTokenRequired => "AccessTokenRequired",
Error::DataMissing => "DataMissing",
}
}
}

@ -438,6 +438,7 @@ impl MastodonBuilder {
}
}
#[allow(dead_code)]
pub fn client(&mut self, client: Client) -> &mut Self {
self.client = Some(client);
self

Loading…
Cancel
Save