From 537824e82b3640243c457698a661dda4e37d4792 Mon Sep 17 00:00:00 2001 From: Khor Shu Heng <32997938+khorshuheng@users.noreply.github.com> Date: Sun, 23 Jun 2024 23:18:38 +0800 Subject: [PATCH] chore: fix clippy linting errors and warnings (#639) --- libs/client-api/src/http_billing.rs | 2 +- services/appflowy-collaborate/src/group/broadcast.rs | 3 --- services/appflowy-collaborate/src/group/cmd.rs | 1 - services/appflowy-collaborate/src/rt_server.rs | 4 ---- 4 files changed, 1 insertion(+), 9 deletions(-) diff --git a/libs/client-api/src/http_billing.rs b/libs/client-api/src/http_billing.rs index 81b64bcb..7612b48e 100644 --- a/libs/client-api/src/http_billing.rs +++ b/libs/client-api/src/http_billing.rs @@ -39,7 +39,7 @@ impl Client { ("recurring_interval", recurring_interval.as_str()), ( "workspace_subscription_plan", - &workspace_subscription_plan.as_str(), + workspace_subscription_plan.as_str(), ), ("success_url", success_url), ]) diff --git a/services/appflowy-collaborate/src/group/broadcast.rs b/services/appflowy-collaborate/src/group/broadcast.rs index 5cff7038..1e1534bd 100644 --- a/services/appflowy-collaborate/src/group/broadcast.rs +++ b/services/appflowy-collaborate/src/group/broadcast.rs @@ -189,7 +189,6 @@ impl CollabBroadcast { Stream: StreamExt + Send + Sync + Unpin + 'static, >::Error: std::error::Error + Send + Sync, { - let cloned_origin = subscriber_origin.clone(); let sink_stop_tx = { let mut sink = sink.clone(); let (stop_tx, mut stop_rx) = tokio::sync::mpsc::channel::<()>(1); @@ -266,7 +265,6 @@ impl CollabBroadcast { }; Subscription { - origin: cloned_origin, sink_stop_tx: Some(sink_stop_tx), stream_stop_tx: Some(stream_stop_tx), } @@ -540,7 +538,6 @@ fn ack_code_from_error(error: &RTProtocolError) -> AckCode { /// connection error or closed connection). #[derive(Debug)] pub struct Subscription { - pub origin: CollabOrigin, sink_stop_tx: Option>, stream_stop_tx: Option>, } diff --git a/services/appflowy-collaborate/src/group/cmd.rs b/services/appflowy-collaborate/src/group/cmd.rs index 5ccc37a0..5bfc8480 100644 --- a/services/appflowy-collaborate/src/group/cmd.rs +++ b/services/appflowy-collaborate/src/group/cmd.rs @@ -46,7 +46,6 @@ where { pub group_manager: Arc>, pub msg_router_by_user: Arc>, - pub access_control: Arc, pub recv: Option, } diff --git a/services/appflowy-collaborate/src/rt_server.rs b/services/appflowy-collaborate/src/rt_server.rs index da594cbc..2d6e5aa2 100644 --- a/services/appflowy-collaborate/src/rt_server.rs +++ b/services/appflowy-collaborate/src/rt_server.rs @@ -32,7 +32,6 @@ pub struct CollaborationServer { group_manager: Arc>, connect_state: ConnectState, group_sender_by_object_id: Arc>, - access_control: Arc, storage: Arc, #[allow(dead_code)] metrics: Arc, @@ -82,7 +81,6 @@ where group_manager, connect_state, group_sender_by_object_id, - access_control, metrics, metrics_calculate, }) @@ -168,7 +166,6 @@ where let group_sender_by_object_id = self.group_sender_by_object_id.clone(); let client_msg_router_by_user = self.connect_state.client_message_routers.clone(); let group_manager = self.group_manager.clone(); - let access_control = self.access_control.clone(); Box::pin(async move { for (object_id, collab_messages) in message_by_oid { @@ -186,7 +183,6 @@ where let runner = GroupCommandRunner { group_manager: group_manager.clone(), msg_router_by_user: client_msg_router_by_user.clone(), - access_control: access_control.clone(), recv: Some(recv), };