diff --git a/Cargo.toml b/Cargo.toml index 9de1b661..8873a8c2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -86,7 +86,7 @@ sqlx = { version = "0.5", optional = true, default-features = false, features = "macros", "sqlite", ] } -redis = { version = "0.16", optional = true } +redis = { version = "0.20", features = ["tokio-comp"], optional = true } serde_cbor = { version = "0.11", optional = true } bincode = { version = "1.3", optional = true } frunk = { version = "0.3", optional = true } diff --git a/src/dispatching/dialogue/mod.rs b/src/dispatching/dialogue/mod.rs index 2bd7f39e..303d161c 100644 --- a/src/dispatching/dialogue/mod.rs +++ b/src/dispatching/dialogue/mod.rs @@ -158,13 +158,11 @@ pub use transition::{ }; #[cfg(feature = "macros")] -// FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> -#[cfg_attr(all(teloxide_docsrs, feature = "nightly"), doc(cfg(feature = "macros")))] +#[cfg_attr(all(docsrs, feature = "nightly"), doc(cfg(feature = "macros")))] pub use teloxide_macros::Transition; #[cfg(feature = "redis-storage")] -// FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> -#[cfg_attr(all(teloxide_docsrs, feature = "nightly"), doc(cfg(feature = "redis-storage")))] +#[cfg_attr(all(docsrs, feature = "nightly"), doc(cfg(feature = "redis-storage")))] pub use storage::{RedisStorage, RedisStorageError}; #[cfg(feature = "sqlite-storage")] diff --git a/src/dispatching/dialogue/storage/mod.rs b/src/dispatching/dialogue/storage/mod.rs index 1ca36fb1..31664425 100644 --- a/src/dispatching/dialogue/storage/mod.rs +++ b/src/dispatching/dialogue/storage/mod.rs @@ -14,8 +14,7 @@ use futures::future::BoxFuture; pub use self::{in_mem_storage::InMemStorage, trace_storage::TraceStorage}; #[cfg(feature = "redis-storage")] -// FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> -#[cfg_attr(all(teloxide_docsrs, feature = "nightly"), doc(cfg(feature = "redis-storage")))] +#[cfg_attr(all(docsrs, feature = "nightly"), doc(cfg(feature = "redis-storage")))] pub use redis_storage::{RedisStorage, RedisStorageError}; pub use serializer::Serializer; use std::sync::Arc; diff --git a/src/dispatching/dialogue/storage/serializer.rs b/src/dispatching/dialogue/storage/serializer.rs index aa1aaf01..2e0aa945 100644 --- a/src/dispatching/dialogue/storage/serializer.rs +++ b/src/dispatching/dialogue/storage/serializer.rs @@ -32,13 +32,11 @@ where /// /// [CBOR]: https://en.wikipedia.org/wiki/CBOR #[cfg(feature = "cbor-serializer")] -// FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> -#[cfg_attr(all(teloxide_docsrs, feature = "nightly"), doc(cfg(feature = "cbor-serializer")))] +#[cfg_attr(all(docsrs, feature = "nightly"), doc(cfg(feature = "cbor-serializer")))] pub struct Cbor; #[cfg(feature = "cbor-serializer")] -// FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> -#[cfg_attr(all(teloxide_docsrs, feature = "nightly"), doc(cfg(feature = "cbor-serializer")))] +#[cfg_attr(all(docsrs, feature = "nightly"), doc(cfg(feature = "cbor-serializer")))] impl<D> Serializer<D> for Cbor where D: Serialize + DeserializeOwned, @@ -58,13 +56,11 @@ where /// /// [Bincode]: https://github.com/servo/bincode #[cfg(feature = "bincode-serializer")] -// FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> -#[cfg_attr(all(teloxide_docsrs, feature = "nightly"), doc(cfg(feature = "bincode-serializer")))] +#[cfg_attr(all(docsrs, feature = "nightly"), doc(cfg(feature = "bincode-serializer")))] pub struct Bincode; #[cfg(feature = "bincode-serializer")] -// FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> -#[cfg_attr(all(teloxide_docsrs, feature = "nightly"), doc(cfg(feature = "bincode-serializer")))] +#[cfg_attr(all(docsrs, feature = "nightly"), doc(cfg(feature = "bincode-serializer")))] impl<D> Serializer<D> for Bincode where D: Serialize + DeserializeOwned, diff --git a/src/dispatching/update_listeners.rs b/src/dispatching/update_listeners.rs index 523eb5cf..a3ec5097 100644 --- a/src/dispatching/update_listeners.rs +++ b/src/dispatching/update_listeners.rs @@ -97,7 +97,7 @@ //! [`UpdateListener`]: UpdateListener //! [`polling_default`]: polling_default //! [`polling`]: polling -//! [`Box::get_updates`]: crate::Bot::get_updates +//! [`Box::get_updates`]: crate::requests::Requester::get_updates //! [getting updates]: https://core.telegram.org/bots/api#getting-updates //! [long]: https://en.wikipedia.org/wiki/Push_technology#Long_polling //! [short]: https://en.wikipedia.org/wiki/Polling_(computer_science) @@ -139,7 +139,7 @@ where /// /// See also: [`polling_default`](polling_default). /// -/// [`GetUpdates`]: crate::requests::GetUpdates +/// [`GetUpdates`]: crate::payloads::GetUpdates pub fn polling<R>( requester: R, timeout: Option<Duration>, diff --git a/src/lib.rs b/src/lib.rs index 6fc2e995..5ecb64cf 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -45,11 +45,9 @@ // // To properly build docs of this crate run // ```console -// FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> -// $ RUSTDOCFLAGS="--cfg teloxide_docsrs" cargo +nightly doc --open --all-features +// $ RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --open --all-features // ``` -// FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> -#![cfg_attr(all(teloxide_docsrs, feature = "nightly"), feature(doc_cfg))] +#![cfg_attr(all(docsrs, feature = "nightly"), feature(doc_cfg))] pub use dispatching::repls::{ commands_repl, commands_repl_with_listener, dialogues_repl, dialogues_repl_with_listener, repl, @@ -67,12 +65,10 @@ pub mod utils; pub use teloxide_core::*; #[cfg(feature = "macros")] -// FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> -#[cfg_attr(all(teloxide_docsrs, feature = "nightly"), doc(cfg(feature = "macros")))] +#[cfg_attr(all(docsrs, feature = "nightly"), doc(cfg(feature = "macros")))] pub use teloxide_macros as macros; -// FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> -#[cfg_attr(all(teloxide_docsrs, feature = "nightly"), doc(cfg(feature = "macros")))] +#[cfg_attr(all(docsrs, feature = "nightly"), doc(cfg(feature = "macros")))] #[cfg(feature = "macros")] pub use teloxide_macros::teloxide; diff --git a/src/prelude.rs b/src/prelude.rs index fb84de67..b7f9a040 100644 --- a/src/prelude.rs +++ b/src/prelude.rs @@ -12,8 +12,7 @@ pub use crate::{ respond, }; -// FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> -#[cfg_attr(all(teloxide_docsrs, feature = "nightly"), doc(cfg(feature = "macros")))] +#[cfg_attr(all(docsrs, feature = "nightly"), doc(cfg(feature = "macros")))] #[cfg(feature = "macros")] pub use crate::teloxide; @@ -25,12 +24,11 @@ pub use teloxide_core::types::{ #[cfg(feature = "auto-send")] pub use crate::adaptors::AutoSend; -#[doc(inline)] +#[doc(no_inline)] pub use teloxide_core::prelude::*; #[cfg(feature = "frunk")] -// FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> -#[cfg_attr(all(teloxide_docsrs, feature = "nightly"), doc(cfg(feature = "frunk")))] +#[cfg_attr(all(docsrs, feature = "nightly"), doc(cfg(feature = "frunk")))] pub use crate::utils::UpState; pub use tokio::sync::mpsc::UnboundedReceiver; diff --git a/src/utils/command.rs b/src/utils/command.rs index 83778813..22a795e4 100644 --- a/src/utils/command.rs +++ b/src/utils/command.rs @@ -52,8 +52,7 @@ use std::{ }; #[cfg(feature = "macros")] -// FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> -#[cfg_attr(all(teloxide_docsrs, feature = "nightly"), doc(cfg(feature = "macros")))] +#[cfg_attr(all(docsrs, feature = "nightly"), doc(cfg(feature = "macros")))] pub use teloxide_macros::BotCommand; /// An enumeration of bot's commands. diff --git a/src/utils/mod.rs b/src/utils/mod.rs index e34561ae..6e29632d 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -8,6 +8,5 @@ mod up_state; pub use teloxide_core::net::client_from_env; #[cfg(feature = "frunk")] -// FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> -#[cfg_attr(all(teloxide_docsrs, feature = "nightly"), doc(cfg(feature = "frunk")))] +#[cfg_attr(all(docsrs, feature = "nightly"), doc(cfg(feature = "frunk")))] pub use up_state::UpState;