Merge pull request #119 from luminosoda/patch-1

Fix type of `Poll::{correct_option_id,open_period}` fields: `i32` => `u8` and `u16`
This commit is contained in:
Waffle Lapkin 2021-09-07 17:57:11 +03:00 committed by GitHub
commit 2774c0cd4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -24,7 +24,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Type of `BanChatMember::until_date`: `u64` -> `chrono::DateTime<Utc>` ([#116][pr116])
- Type of `Poll::correct_option_id`: `i32` -> `u8` ([#119][pr119])
- Type of `Poll::open_period`: `i32` -> `u16` ([#119][pr119])
[pr119]: https://github.com/teloxide/teloxide-core/pull/119
## 0.3.3 - 2021-08-03
### Fixed

View file

@ -37,7 +37,7 @@ pub struct Poll {
/// 0-based identifier of the correct answer option. Available only for
/// polls in the quiz mode, which are closed, or was sent (not
/// forwarded) by the bot or to the private chat with the bot.
pub correct_option_id: Option<i32>,
pub correct_option_id: Option<u8>,
/// Text that is shown when a user chooses an incorrect answer or taps on
/// the lamp icon in a quiz-style poll, 0-200 characters.
@ -48,7 +48,7 @@ pub struct Poll {
pub explanation_entities: Option<Vec<MessageEntity>>,
/// Amount of time in seconds the poll will be active after creation.
pub open_period: Option<i32>,
pub open_period: Option<u16>,
/// Point in time when the poll will be automatically closed.
#[serde(with = "crate::types::serde_opt_date_from_unix_timestamp")]