Skip to content

Commit

Permalink
refactor: reexport apply
Browse files Browse the repository at this point in the history
its a bit easier to read when its imported from the same place
  • Loading branch information
EdJoPaTo committed Sep 17, 2024
1 parent e26ee61 commit 936ae90
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/api_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
use std::path::PathBuf;

use macro_rules_attribute::apply;
use serde::{Deserialize, Serialize};

use crate::macros::apistruct;
use crate::macros::{apistruct, apply};
use crate::objects::{
AllowedUpdate, BotCommand, ChatAdministratorRights, ChatPermissions, ForceReply,
InlineKeyboardMarkup, InlineQueryResultArticle, InlineQueryResultAudio,
Expand Down
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ mod client_ureq;
mod error;
#[cfg(any(feature = "http-client", feature = "async-http-client"))]
mod json;
mod macros;
pub mod objects;
mod parse_mode;
pub mod response;
Expand All @@ -35,7 +36,5 @@ mod trait_async;
#[cfg(feature = "telegram-trait")]
mod trait_sync;

mod macros;

/// Default Bot API URL
pub const BASE_API_URL: &str = "https://api.telegram.org/bot";
2 changes: 2 additions & 0 deletions src/macros.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
pub use macro_rules_attribute::apply;

macro_rules_attribute::attribute_alias! {
// Enable [`bon::builder`] `into` for specific types to reduce boilerplate for the callers.
#[apply(apistruct!)] =
Expand Down
3 changes: 1 addition & 2 deletions src/objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
#![allow(deprecated)]

use macro_rules_attribute::apply;
use serde::{Deserialize, Serialize};

use crate::api_params::FileUpload;
use crate::macros::apistruct;
use crate::macros::{apistruct, apply};
use crate::ParseMode;

#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
Expand Down

0 comments on commit 936ae90

Please sign in to comment.