From e96139634dac709a283be328ea4395b8c97a1e1b Mon Sep 17 00:00:00 2001 From: YouKnow Date: Wed, 4 Sep 2024 19:38:53 +0330 Subject: [PATCH] fixed clippy errors for rust nightly --- .../teloxide-core/src/types/keyboard_button_request_chat.rs | 2 ++ .../teloxide-core/src/types/keyboard_button_request_users.rs | 2 ++ crates/teloxide/src/stop.rs | 5 +---- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/teloxide-core/src/types/keyboard_button_request_chat.rs b/crates/teloxide-core/src/types/keyboard_button_request_chat.rs index 47f9c4a3..8ff9e10b 100644 --- a/crates/teloxide-core/src/types/keyboard_button_request_chat.rs +++ b/crates/teloxide-core/src/types/keyboard_button_request_chat.rs @@ -3,6 +3,8 @@ use serde::{Deserialize, Serialize}; use crate::types::{ChatAdministratorRights, RequestId}; /// This object defines the criteria used to request a suitable chat. +/// +/// /// Information about the selected chat will be shared with the bot when the /// corresponding button is pressed. The bot will be granted requested rights in /// the chat if appropriate. [More about requesting chats »] diff --git a/crates/teloxide-core/src/types/keyboard_button_request_users.rs b/crates/teloxide-core/src/types/keyboard_button_request_users.rs index 8c38b831..0ba4632c 100644 --- a/crates/teloxide-core/src/types/keyboard_button_request_users.rs +++ b/crates/teloxide-core/src/types/keyboard_button_request_users.rs @@ -3,6 +3,8 @@ use serde::{Deserialize, Serialize}; use crate::types::RequestId; /// This object defines the criteria used to request a suitable users. +/// +/// /// Information about the selected users will be shared with the bot when the /// corresponding button is pressed. More about requesting users » /// diff --git a/crates/teloxide/src/stop.rs b/crates/teloxide/src/stop.rs index e7b185ba..9caae098 100644 --- a/crates/teloxide/src/stop.rs +++ b/crates/teloxide/src/stop.rs @@ -53,9 +53,6 @@ impl Future for StopFlag { type Output = (); fn poll(self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> task::Poll { - self.project().0.poll(cx).map(|res| match res { - Err(_aborted) => (), - Ok(unreachable) => match unreachable {}, - }) + self.project().0.poll(cx).map(|_res| ()) } }