mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +01:00
Remove Integer
and UnsignedInteger
aliases
This commit is contained in:
parent
d18f7f9666
commit
8b878c3827
6 changed files with 14 additions and 23 deletions
|
@ -1,9 +1,9 @@
|
|||
use crate::core::types::{ChatPermissions, ChatPhoto, Message, Integer};
|
||||
use crate::core::types::{ChatPermissions, ChatPhoto, Message};
|
||||
|
||||
|
||||
#[derive(Debug, Deserialize, Eq, Hash, PartialEq)]
|
||||
pub struct Chat {
|
||||
pub id: Integer,
|
||||
pub id: i32,
|
||||
#[serde(flatten)]
|
||||
pub type_: ChatType,
|
||||
pub photo: Option<ChatPhoto>,
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
use crate::core::types::{
|
||||
User, ChatMemberStatus, Integer
|
||||
};
|
||||
use crate::core::types::{User, ChatMemberStatus};
|
||||
|
||||
/// This object contains information about one member of the chat.
|
||||
#[derive(Debug, Deserialize, Hash, PartialEq, Eq)]
|
||||
|
@ -10,7 +8,7 @@ pub struct ChatMember {
|
|||
/// The member's status in the chat.
|
||||
pub status: ChatMemberStatus,
|
||||
///Optional. Restricted and kicked only. Date when restrictions will be lifted for this user, unix time
|
||||
pub until_date: Option<Integer>,
|
||||
pub until_date: Option<i32>,
|
||||
///Optional. Administrators only. True, if the bot is allowed to edit administrator privileges of that user
|
||||
pub can_be_edited: Option<bool>,
|
||||
///Optional. Administrators only. True, if the administrator can change the chat title, photo and other settings
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use crate::core::types::{PhotoSize, UnsignedInteger};
|
||||
use crate::core::types::PhotoSize;
|
||||
|
||||
|
||||
#[derive(Debug, Deserialize, Eq, Hash, PartialEq)]
|
||||
|
@ -7,5 +7,5 @@ pub struct Document {
|
|||
pub thumb: Option<PhotoSize>,
|
||||
pub file_name: Option<String>,
|
||||
pub mime_type: Option<String>,
|
||||
pub file_size: Option<UnsignedInteger>,
|
||||
pub file_size: Option<u32>,
|
||||
}
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
use self::not_implemented_types::*;
|
||||
|
||||
|
||||
pub type Integer = i32;
|
||||
pub type UnsignedInteger = u32;
|
||||
|
||||
|
||||
pub use self::{
|
||||
answer_pre_checkout_query::AnswerPreCheckoutQuery,
|
||||
answer_shipping_query::AnswerShippingQuery,
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
use crate::core::types::{Integer, UnsignedInteger};
|
||||
|
||||
|
||||
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
|
||||
pub struct PhotoSize {
|
||||
pub file_id: String,
|
||||
pub width: Integer,
|
||||
pub heigth: Integer,
|
||||
pub file_size: Option<UnsignedInteger>
|
||||
pub width: i32,
|
||||
pub heigth: i32,
|
||||
pub file_size: Option<u32>
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
use crate::core::types::{PhotoSize, UnsignedInteger};
|
||||
use crate::core::types::PhotoSize;
|
||||
|
||||
|
||||
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
|
||||
pub struct Video {
|
||||
pub file_id: String,
|
||||
pub width: UnsignedInteger,
|
||||
pub height: UnsignedInteger,
|
||||
pub duration: UnsignedInteger,
|
||||
pub width: u32,
|
||||
pub height: u32,
|
||||
pub duration: u32,
|
||||
pub thumb: Option<PhotoSize>,
|
||||
pub mime_type: Option<String>,
|
||||
pub file_size: Option<UnsignedInteger>
|
||||
pub file_size: Option<u32>
|
||||
}
|
Loading…
Reference in a new issue