From 50f5be3e751b2f34e4090396885cb3f1f5eb6992 Mon Sep 17 00:00:00 2001 From: "Lucas.Xu" Date: Mon, 1 Jul 2024 13:26:43 +0800 Subject: [PATCH] chore: fix rustfmt ci test (#5664) --- frontend/rust-lib/flowy-chat/src/local_ai/chat_plugin.rs | 3 ++- frontend/rust-lib/flowy-chat/tests/util.rs | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/rust-lib/flowy-chat/src/local_ai/chat_plugin.rs b/frontend/rust-lib/flowy-chat/src/local_ai/chat_plugin.rs index 2e26e1b582..8287e86c8b 100644 --- a/frontend/rust-lib/flowy-chat/src/local_ai/chat_plugin.rs +++ b/frontend/rust-lib/flowy-chat/src/local_ai/chat_plugin.rs @@ -122,7 +122,8 @@ impl ResponseParser for ChatRelatedQuestionsResponseParser { fn parse_json(json: JsonValue) -> Result { json .get("data") - .and_then(|data| data.as_array()).cloned() + .and_then(|data| data.as_array()) + .cloned() .ok_or(RemoteError::ParseResponse(json)) } } diff --git a/frontend/rust-lib/flowy-chat/tests/util.rs b/frontend/rust-lib/flowy-chat/tests/util.rs index 5dbf37d8c8..a1f9e51d1e 100644 --- a/frontend/rust-lib/flowy-chat/tests/util.rs +++ b/frontend/rust-lib/flowy-chat/tests/util.rs @@ -72,7 +72,6 @@ impl LocalAITest { ) -> String { let plugin = self.manager.get_plugin(plugin_id).await.unwrap(); let operation = ChatPluginOperation::new(plugin); - operation.send_message(chat_id, message).await.unwrap() } @@ -95,7 +94,7 @@ impl LocalAITest { ) -> Vec { let plugin = self.manager.get_plugin(plugin_id).await.unwrap(); let operation = ChatPluginOperation::new(plugin); - + operation.get_related_questions(chat_id).await.unwrap() }