mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-03 09:49:07 +01:00
Remove useless const
This commit is contained in:
parent
762ab2f5e3
commit
cde45ab8ee
4 changed files with 5 additions and 10 deletions
|
@ -12,12 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## Changed
|
||||
|
||||
- The following functions were made `const`:
|
||||
- `Dialogue::{new, chat_id}`
|
||||
- `Polling::builder`
|
||||
- `StatefulListener::new_with_hints`
|
||||
- `CommandDescriptions::new`
|
||||
- `respond`
|
||||
- `CommandDescriptions::new` is made `const`
|
||||
- The following functions were made `#[must_use]`:
|
||||
- `DispatcherBuilder::{enable_ctrlc_handler, distribution_function}`
|
||||
|
||||
|
|
|
@ -141,13 +141,13 @@ where
|
|||
/// Constructs a new dialogue with `storage` (where dialogues are stored)
|
||||
/// and `chat_id` of a current dialogue.
|
||||
#[must_use]
|
||||
pub const fn new(storage: Arc<S>, chat_id: ChatId) -> Self {
|
||||
pub fn new(storage: Arc<S>, chat_id: ChatId) -> Self {
|
||||
Self { storage, chat_id, _phantom: PhantomData }
|
||||
}
|
||||
|
||||
/// Returns a chat ID associated with this dialogue.
|
||||
#[must_use]
|
||||
pub const fn chat_id(&self) -> ChatId {
|
||||
pub fn chat_id(&self) -> ChatId {
|
||||
self.chat_id
|
||||
}
|
||||
|
||||
|
|
|
@ -250,7 +250,7 @@ where
|
|||
<R as Requester>::GetUpdates: Send,
|
||||
{
|
||||
/// Returns a builder for polling update listener.
|
||||
pub const fn builder(bot: R) -> PollingBuilder<R> {
|
||||
pub fn builder(bot: R) -> PollingBuilder<R> {
|
||||
PollingBuilder {
|
||||
bot,
|
||||
timeout: None,
|
||||
|
|
|
@ -55,7 +55,7 @@ impl<St, Assf, Sf> StatefulListener<St, Assf, Sf, Haufn<St>, Thfn<St>> {
|
|||
|
||||
impl<St, Assf, Sf, Hauf, Thf> StatefulListener<St, Assf, Sf, Hauf, Thf> {
|
||||
/// Creates a new stateful listener from its components.
|
||||
pub const fn new_with_hints(
|
||||
pub fn new_with_hints(
|
||||
state: St,
|
||||
stream: Assf,
|
||||
stop_token: Sf,
|
||||
|
|
Loading…
Reference in a new issue