Skip to content

Commit

Permalink
build!: remove implicit features
Browse files Browse the repository at this point in the history
This will be the default with the upcoming Edition 2024 as it caused confusion. See https://doc.rust-lang.org/nightly/edition-guide/rust-2024/cargo-remove-implicit-features.html

BREAKING CHANGE: Optional dependencies are no longer features. They were never intended to be used directly.
  • Loading branch information
EdJoPaTo committed Sep 17, 2024
1 parent d20ad40 commit 6f12385
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ all-features = true

[features]
default = ["http-client"]
http-client = ["ureq", "multipart", "mime_guess", "telegram-trait", "serde_json"]
http-client = ["telegram-trait", "dep:ureq", "dep:multipart", "dep:mime_guess", "dep:serde_json"]
telegram-trait = []
async-http-client = ["reqwest", "tokio", "async-telegram-trait", "serde_json"]
async-telegram-trait = ["async-trait"]
async-http-client = ["async-telegram-trait", "dep:reqwest", "dep:tokio", "dep:serde_json"]
async-telegram-trait = ["dep:async-trait"]

[lints.rust]
unsafe_code = "forbid"
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))]

#[cfg(feature = "reqwest")]
#[cfg(feature = "async-http-client")]
pub use reqwest;
#[cfg(feature = "ureq")]
#[cfg(feature = "http-client")]
pub use ureq;

pub use self::api_params::*;
Expand All @@ -25,7 +25,7 @@ mod client_reqwest;
#[cfg(feature = "http-client")]
mod client_ureq;
mod error;
#[cfg(feature = "serde_json")]
#[cfg(any(feature = "http-client", feature = "async-http-client"))]
mod json;
pub mod objects;
mod parse_mode;
Expand Down

0 comments on commit 6f12385

Please sign in to comment.