From 67e8740576e26e07d93f50d56778a2882115492a Mon Sep 17 00:00:00 2001 From: Desiders Date: Thu, 13 Jun 2024 22:30:18 +0300 Subject: [PATCH] Improve imports --- telers/src/types.rs | 5 ++--- telers/src/types/chat_full_info.rs | 16 ++++++++-------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/telers/src/types.rs b/telers/src/types.rs index 019996f..0b6ba0e 100644 --- a/telers/src/types.rs +++ b/telers/src/types.rs @@ -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; @@ -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; diff --git a/telers/src/types/chat_full_info.rs b/telers/src/types/chat_full_info.rs index 78c70db..38bd698 100644 --- a/telers/src/types/chat_full_info.rs +++ b/telers/src/types/chat_full_info.rs @@ -11,14 +11,14 @@ use serde::Deserialize; #[derive(Debug, Clone, PartialEq, Deserialize)] #[serde(tag = "type", rename_all = "snake_case")] pub enum ChatFullInfo { - Private(Box), - Group(Box), - Supergroup(Box), - Channel(Box), + Private(Box), + Group(Box), + Supergroup(Box), + Channel(Box), } #[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 @@ -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 @@ -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 @@ -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