From fde96ac8956d35c884f51afb01140a3faeb92b80 Mon Sep 17 00:00:00 2001 From: ModulatingForce <116608425+modulatingforce@users.noreply.github.com> Date: Wed, 3 Apr 2024 19:45:18 -0400 Subject: [PATCH] clippy cleanup --- src/core/bot_actions.rs | 5 +++-- src/core/chat.rs | 2 +- src/custom/experimental/experiment001.rs | 1 - 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/bot_actions.rs b/src/core/bot_actions.rs index f5c8a66..7ab34a0 100644 --- a/src/core/bot_actions.rs +++ b/src/core/bot_actions.rs @@ -73,7 +73,8 @@ impl ExecBodyParams { // filter out all tags that do not have content. let tag_contents: Vec = tags.iter().filter_map(|tag| { - if let Some(&Some(ref t)) = map.get(*tag) { + // if let Some(&Some(ref t)) = map.get(*tag) { + if let Some(Some(t)) = map.get(*tag) { Some(t.clone()) } else { None @@ -82,7 +83,7 @@ impl ExecBodyParams { // if no tags got filtered out return the struct. // else return `None`. - return if tag_contents.len() == 5 { + if tag_contents.len() == 5 { Some(ReplyParent { sender: TwitchUserBasics { id: tag_contents[0].clone(), diff --git a/src/core/chat.rs b/src/core/chat.rs index 3ed28ce..43984bc 100644 --- a/src/core/chat.rs +++ b/src/core/chat.rs @@ -4,7 +4,7 @@ use std::sync::Arc; use tokio::sync::Mutex; use twitch_irc::login::StaticLoginCredentials; -use twitch_irc::message::{PrivmsgMessage, ReplyToMessage}; +use twitch_irc::message::ReplyToMessage; use twitch_irc::transport::tcp::{TCPTransport, TLS}; use twitch_irc::TwitchIRCClient; diff --git a/src/custom/experimental/experiment001.rs b/src/custom/experimental/experiment001.rs index 897384d..18d7aaa 100644 --- a/src/custom/experimental/experiment001.rs +++ b/src/custom/experimental/experiment001.rs @@ -147,7 +147,6 @@ async fn rp(params : ExecBodyParams) params.clone() ).await; } - else { println!("no reply")