Skip to content

Commit

Permalink
Improve imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Desiders committed Jun 13, 2024
1 parent 1682f05 commit 67e8740
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
5 changes: 2 additions & 3 deletions telers/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ pub use business_opening_hours::BusinessOpeningHours;
pub use business_opening_hours_interval::BusinessOpeningHoursInterval;
pub use callback_game::CallbackGame;
pub use callback_query::CallbackQuery;
pub use chat::Chat;
pub use chat::{Channel, Chat, Group, Private, Supergroup};
pub use chat_administrator_rights::ChatAdministratorRights;
pub use chat_background::ChatBackground;
pub use chat_boost::ChatBoost;
Expand All @@ -288,8 +288,7 @@ pub use chat_boost_source_giveaway::ChatBoostSourceGiveaway;
pub use chat_boost_source_premium::ChatBoostSourcePremium;
pub use chat_boost_updated::ChatBoostUpdated;
pub use chat_full_info::{
Channel as ChatChannel, ChatFullInfo, Group as ChatGroup, Private as ChatPrivate,
Supergroup as ChatSupergroup,
ChannelFullInfo, ChatFullInfo, GroupFullInfo, PrivateFullInfo, SupergroupFullInfo,
};
pub use chat_id_kind::ChatIdKind;
pub use chat_invite_link::ChatInviteLink;
Expand Down
16 changes: 8 additions & 8 deletions telers/src/types/chat_full_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ use serde::Deserialize;
#[derive(Debug, Clone, PartialEq, Deserialize)]
#[serde(tag = "type", rename_all = "snake_case")]
pub enum ChatFullInfo {
Private(Box<Private>),
Group(Box<Group>),
Supergroup(Box<Supergroup>),
Channel(Box<Channel>),
Private(Box<PrivateFullInfo>),
Group(Box<GroupFullInfo>),
Supergroup(Box<SupergroupFullInfo>),
Channel(Box<ChannelFullInfo>),
}

#[derive(Debug, Default, Clone, PartialEq, Deserialize)]
pub struct Private {
pub struct PrivateFullInfo {
/// Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in i64erpreting it. But it has at most 52 significant bits, so a signed 64-bit i64eger or double-precision float type are safe for storing this identifier.
pub id: i64,
/// Username
Expand Down Expand Up @@ -68,7 +68,7 @@ pub struct Private {
}

#[derive(Debug, Clone, PartialEq, Deserialize)]
pub struct Group {
pub struct GroupFullInfo {
/// Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in i64erpreting it. But it has at most 52 significant bits, so a signed 64-bit i64eger or double-precision float type are safe for storing this identifier.
pub id: i64,
/// Title
Expand All @@ -94,7 +94,7 @@ pub struct Group {
}

#[derive(Debug, Clone, PartialEq, Deserialize)]
pub struct Supergroup {
pub struct SupergroupFullInfo {
/// Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in i64erpreting it. But it has at most 52 significant bits, so a signed 64-bit i64eger or double-precision float type are safe for storing this identifier.
pub id: i64,
/// Title
Expand Down Expand Up @@ -162,7 +162,7 @@ pub struct Supergroup {
}

#[derive(Debug, Clone, PartialEq, Deserialize)]
pub struct Channel {
pub struct ChannelFullInfo {
/// Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in i64erpreting it. But it has at most 52 significant bits, so a signed 64-bit i64eger or double-precision float type are safe for storing this identifier.
pub id: i64,
/// Title
Expand Down

0 comments on commit 67e8740

Please sign in to comment.