Fix lint errors

This commit is contained in:
Gregory Schier
2025-12-28 15:18:01 -08:00
parent 8e1959b7c3
commit 2fc8678183
7 changed files with 33 additions and 24 deletions

View File

@@ -356,7 +356,7 @@ async fn execute_transaction<R: Runtime>(
})?;
// Create bounded channel for receiving events and spawn a task to store them in DB
// Buffer size of 100 events provides backpressure if DB writes are slow
// Buffer size of 100 events provides back pressure if DB writes are slow
let (event_tx, mut event_rx) =
tokio::sync::mpsc::channel::<yaak_http::sender::HttpResponseEvent>(100);
@@ -466,7 +466,7 @@ async fn execute_transaction<R: Runtime>(
.iter()
.map(|(name, value)| HttpResponseHeader { name: name.clone(), value: value.clone() })
.collect();
r.content_length = http_response.content_length.map(|l| l as i64);
r.content_length = http_response.content_length.map(|l| l as i32);
r.state = HttpResponseState::Connected;
r.request_headers = http_response
.request_headers
@@ -528,7 +528,7 @@ async fn execute_transaction<R: Runtime>(
if elapsed_since_update >= UPDATE_INTERVAL_MS {
response_ctx.update(|r| {
r.elapsed = start.elapsed().as_millis() as i32;
r.content_length = Some(written_bytes as i64);
r.content_length = Some(written_bytes as i32);
})?;
last_update_time = now;
}
@@ -542,7 +542,7 @@ async fn execute_transaction<R: Runtime>(
// Final update with closed state and accurate byte count
response_ctx.update(|r| {
r.elapsed = start.elapsed().as_millis() as i32;
r.content_length = Some(written_bytes as i64);
r.content_length = Some(written_bytes as i32);
r.state = HttpResponseState::Closed;
})?;
@@ -572,7 +572,7 @@ fn write_bytes_to_db_sync<R: Runtime>(
// Update the response with the total request body size
response_ctx.update(|r| {
r.request_content_length = Some(data.len() as i64);
r.request_content_length = Some(data.len() as i32);
})?;
Ok(())
@@ -634,7 +634,7 @@ async fn write_stream_chunks_to_db<R: Runtime>(
app_handle.with_tx(|tx| {
debug!("Updating final body length {total_bytes}");
if let Ok(mut response) = tx.get_http_response(&response_id) {
response.request_content_length = Some(total_bytes as i64);
response.request_content_length = Some(total_bytes as i32);
tx.update_http_response_if_id(&response, update_source)?;
}
Ok(())