Rename CommandRepl => CommandReplExt

Former-commit-id: e7c5317954
This commit is contained in:
Hirrolot 2022-10-29 14:39:21 +06:00
parent 9b8e21231c
commit 5532a4cd87
5 changed files with 9 additions and 9 deletions

View file

@ -8,11 +8,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- `teloxide::dispatching::repls::CommandRepl`, `teloxide::prelude::CommandRepl` ([issue #740](https://github.com/teloxide/teloxide/issues/740))
- `teloxide::dispatching::repls::CommandReplExt`, `teloxide::prelude::CommandReplExt` ([issue #740](https://github.com/teloxide/teloxide/issues/740))
### Deprecated
- `teloxide::dispatching::repls::{commands_repl, commands_repl_with_listener}`, `teloxide::utils::command::BotCommands::ty` (use `CommandRepl` instead)
- `teloxide::dispatching::repls::{commands_repl, commands_repl_with_listener}`, `teloxide::utils::command::BotCommands::ty` (use `CommandReplExt` instead)
## 0.11.0 - 2022-10-07

View file

@ -11,7 +11,7 @@
mod commands_repl;
mod repl;
pub use commands_repl::CommandRepl;
pub use commands_repl::CommandReplExt;
#[allow(deprecated)]
pub use commands_repl::{commands_repl, commands_repl_with_listener};
pub use repl::{repl, repl_with_listener};

View file

@ -65,10 +65,10 @@ use std::{fmt::Debug, marker::PhantomData};
#[doc = include_str!("caution.md")]
///
#[cfg(feature = "ctrlc_handler")]
pub trait CommandRepl {
pub trait CommandReplExt {
/// A REPL for commands.
///
/// See [`CommandRepl`] for more details.
/// See [`CommandReplExt`] for more details.
#[must_use]
fn repl<'a, R, H, Args>(bot: R, handler: H) -> BoxFuture<'a, ()>
where
@ -81,7 +81,7 @@ pub trait CommandRepl {
/// A REPL for commands with a custom [`UpdateListener`].
///
/// See [`CommandRepl`] for more details.
/// See [`CommandReplExt`] for more details.
#[must_use]
fn repl_with_listener<'a, R, H, L, Args>(bot: R, handler: H, listener: L) -> BoxFuture<'a, ()>
where
@ -93,7 +93,7 @@ pub trait CommandRepl {
}
#[cfg(feature = "ctrlc_handler")]
impl<Cmd> CommandRepl for Cmd
impl<Cmd> CommandReplExt for Cmd
where
Cmd: BotCommands + Send + Sync + 'static,
{

View file

@ -6,7 +6,7 @@ pub use crate::error_handlers::{LoggingErrorHandler, OnError};
pub use crate::respond;
pub use crate::dispatching::{
dialogue::Dialogue, repls::CommandRepl as _, Dispatcher, HandlerExt as _,
dialogue::Dialogue, repls::CommandReplExt as _, Dispatcher, HandlerExt as _,
MessageFilterExt as _, UpdateFilterExt as _,
};

View file

@ -235,7 +235,7 @@ pub trait BotCommands: Sized {
///
/// [`commands_repl`]: (crate::repls::commands_repl)
#[must_use]
#[deprecated(note = "Use `CommandRepl` instead")]
#[deprecated(note = "Use `CommandReplExt` instead")]
fn ty() -> PhantomData<Self> {
PhantomData
}