chore: cleanup todos and unused parameter

This commit is contained in:
Jindřich Moravec 2024-02-05 23:50:25 +01:00
parent d36d3300d0
commit 25824d78f9
4 changed files with 2 additions and 21 deletions

View file

@ -85,7 +85,7 @@ async fn handle_stream(
let mut wrapped_writer = ServerProtoWrapper::new(writer, config.get_throttle());
let result = match request {
Ok(req) => {
handle_connection(&mut reader, &mut wrapped_writer, req, state, token, config).await
handle_connection(&mut reader, &mut wrapped_writer, req, state, token).await
}
Err(ServerHandshakeError::IsCancelRequest(cancel)) => {
handle_cancellation(cancel.pid, cancel.secret, &tokens).await
@ -141,7 +141,6 @@ async fn handle_connection<R, W>(
request: HandshakeRequest,
state: SharedDbState,
token: ResetCancelToken,
config: Arc<Configuration>,
) -> anyhow::Result<()>
where
R: FrontendProtoReader + Send,
@ -157,7 +156,7 @@ where
break;
}
FrontendMessage::Query(data) => {
let result = handle_query(writer, &state, data.query.into(), &token, &config).await;
let result = handle_query(writer, &state, data.query.into(), &token).await;
match result {
Ok(_) => {}
Err(e) => writer.write_error_message(&e.to_string()).await?,
@ -176,7 +175,6 @@ async fn handle_query<W>(
state: &SharedDbState,
query: String,
token: &ResetCancelToken,
config: &Arc<Configuration>,
) -> anyhow::Result<()>
where
W: BackendProtoWriter + ProtoFlush + Send,