From a5529b474609ebb6d14c2ea6c55311a5caef50d1 Mon Sep 17 00:00:00 2001 From: dal Date: Fri, 21 Mar 2025 11:29:25 -0600 Subject: [PATCH] Fix Clippy warnings in post_chat_handler and add proper prefixes for unused variables --- .../handlers/src/chats/post_chat_handler.rs | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/api/libs/handlers/src/chats/post_chat_handler.rs b/api/libs/handlers/src/chats/post_chat_handler.rs index 0830d2aa3..41ce361ec 100644 --- a/api/libs/handlers/src/chats/post_chat_handler.rs +++ b/api/libs/handlers/src/chats/post_chat_handler.rs @@ -133,7 +133,7 @@ impl ChunkTracker { pub async fn post_chat_handler( request: ChatCreateNewChat, user: AuthenticatedUser, - _tx: Option>>, + tx: Option>>, ) -> Result { // Create a request-local chunk tracker instance instead of using global static let chunk_tracker = ChunkTracker::new(); @@ -158,7 +158,7 @@ pub async fn post_chat_handler( ); // Send initial chat state to client - if let Some(tx) = _tx.clone() { + if let Some(tx) = tx.clone() { tx.send(Ok(( BusterContainer::Chat(chat_with_messages.clone()), ThreadEvent::InitializeChat, @@ -204,7 +204,7 @@ pub async fn post_chat_handler( let mut chat = AgentThread::new(Some(chat_id), user.id, initial_messages); let title_handle = { - let tx = _tx.clone(); + let tx = tx.clone(); let chat_id = chat_id.clone(); let message_id = message_id.clone(); let user_id = user.id.clone(); @@ -1520,8 +1520,8 @@ fn transform_assistant_tool_message( fn assistant_data_catalog_search( id: String, content: String, - progress: MessageProgress, - initial: bool, + _progress: MessageProgress, + _initial: bool, ) -> Result> { let mut parser = StreamingParser::new(); @@ -1589,8 +1589,8 @@ fn assistant_data_catalog_search( fn assistant_create_metrics( id: String, content: String, - progress: MessageProgress, - initial: bool, + _progress: MessageProgress, + _initial: bool, ) -> Result> { let mut parser = StreamingParser::new(); @@ -1613,8 +1613,8 @@ fn assistant_create_metrics( fn assistant_modify_metrics( id: String, content: String, - progress: MessageProgress, - initial: bool, + _progress: MessageProgress, + _initial: bool, ) -> Result> { let mut parser = StreamingParser::new(); @@ -1637,8 +1637,8 @@ fn assistant_modify_metrics( fn assistant_create_dashboards( id: String, content: String, - progress: MessageProgress, - initial: bool, + _progress: MessageProgress, + _initial: bool, ) -> Result> { let mut parser = StreamingParser::new(); @@ -1662,8 +1662,8 @@ fn assistant_create_dashboards( fn assistant_modify_dashboards( id: String, content: String, - progress: MessageProgress, - initial: bool, + _progress: MessageProgress, + _initial: bool, ) -> Result> { let mut parser = StreamingParser::new(); @@ -1686,8 +1686,8 @@ fn assistant_modify_dashboards( fn assistant_create_plan( id: String, content: String, - progress: MessageProgress, - initial: bool, + _progress: MessageProgress, + _initial: bool, ) -> Result> { let mut parser = StreamingParser::new();