mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-09 03:43:22 +01:00
Merge pull request #125 from teloxide/api_error_non_exhaustive
Mark `ApiError` as `non_exhaustive`
This commit is contained in:
commit
2ceb2c5782
2 changed files with 3 additions and 0 deletions
|
@ -20,8 +20,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Use `url::Url` for urls, use `chrono::DateTime<Utc>` for dates in types ([#115][pr115])
|
- Use `url::Url` for urls, use `chrono::DateTime<Utc>` for dates in types ([#115][pr115])
|
||||||
|
- Mark `ApiError` as `non_exhaustive` ([#125][pr125])
|
||||||
|
|
||||||
[pr115]: https://github.com/teloxide/teloxide-core/pull/115
|
[pr115]: https://github.com/teloxide/teloxide-core/pull/115
|
||||||
|
[pr125]: https://github.com/teloxide/teloxide-core/pull/125
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,7 @@ pub enum RequestError {
|
||||||
/// A kind of an API error.
|
/// A kind of an API error.
|
||||||
#[derive(Debug, Deserialize, PartialEq, Hash, Eq, Clone)]
|
#[derive(Debug, Deserialize, PartialEq, Hash, Eq, Clone)]
|
||||||
#[serde(field_identifier)]
|
#[serde(field_identifier)]
|
||||||
|
#[non_exhaustive]
|
||||||
pub enum ApiError {
|
pub enum ApiError {
|
||||||
/// Occurs when the bot tries to send message to user who blocked the bot.
|
/// Occurs when the bot tries to send message to user who blocked the bot.
|
||||||
#[serde(rename = "Forbidden: bot was blocked by the user")]
|
#[serde(rename = "Forbidden: bot was blocked by the user")]
|
||||||
|
|
Loading…
Reference in a new issue