From d7a3a03357dc19498a51b82b5a463adb5a733a83 Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Fri, 7 Aug 2026 12:28:07 +0800 Subject: [PATCH] fix(ci): handle read return value to satisfy clippy unused_io_amount --- crates/dbx-core/src/db/vector_driver.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/dbx-core/src/db/vector_driver.rs b/crates/dbx-core/src/db/vector_driver.rs index 661175e6d6..b68f87a7bb 100644 --- a/crates/dbx-core/src/db/vector_driver.rs +++ b/crates/dbx-core/src/db/vector_driver.rs @@ -924,7 +924,9 @@ mod tests { let server = tokio::spawn(async move { let (mut stream, _) = listener.accept().await.unwrap(); let mut request = [0_u8; 2048]; - stream.read(&mut request).await.unwrap(); + // Mock HTTP server only needs to drain the request before writing the canned response; + // the byte count is irrelevant, so discard it explicitly to satisfy clippy::unused_io_amount. + let _ = stream.read(&mut request).await.unwrap(); let response = format!( "HTTP/1.1 200 OK\r\ncontent-type: application/json\r\ncontent-length: {}\r\nconnection: close\r\n\r\n{}", body.len(),