@@ -147,7 +147,6 @@ async fn read_and_capture_request<S>(
147147) where
148148 S : tokio:: io:: AsyncReadExt + tokio:: io:: AsyncWriteExt + Unpin ,
149149{
150-
151150 let mut buffer = Vec :: new ( ) ;
152151 let mut temp_buf = [ 0u8 ; 8192 ] ;
153152 let mut headers_complete = false ;
@@ -177,9 +176,7 @@ async fn read_and_capture_request<S>(
177176 }
178177 }
179178
180- if let ( Some ( headers_end) , Some ( expected_len) ) =
181- ( headers_end_pos, content_length)
182- {
179+ if let ( Some ( headers_end) , Some ( expected_len) ) = ( headers_end_pos, content_length) {
183180 if buffer. len ( ) - headers_end >= expected_len {
184181 break ;
185182 }
@@ -337,10 +334,7 @@ fn validate_full_export(req: &ReceivedRequest, expected_path: &str) -> anyhow::R
337334 }
338335
339336 // Verify process_tags
340- assert_eq ! (
341- event_json[ "process_tags" ] ,
342- "entrypoint.name:main,pid:12345"
343- ) ;
337+ assert_eq ! ( event_json[ "process_tags" ] , "entrypoint.name:main,pid:12345" ) ;
344338
345339 // Verify attachments
346340 let attachments = event_json[ "attachments" ]
@@ -375,7 +369,11 @@ fn validate_full_export(req: &ReceivedRequest, expected_path: &str) -> anyhow::R
375369 . iter ( )
376370 . find ( |p| p. name == * part_name)
377371 . ok_or_else ( || anyhow:: anyhow!( "Missing part: {}" , part_name) ) ?;
378- assert ! ( !part. content. is_empty( ) , "{} should not be empty" , part_name) ;
372+ assert ! (
373+ !part. content. is_empty( ) ,
374+ "{} should not be empty" ,
375+ part_name
376+ ) ;
379377 }
380378
381379 Ok ( ( ) )
@@ -405,7 +403,8 @@ async fn test_agent_with_transport(transport: Transport) -> anyhow::Result<()> {
405403 } ;
406404
407405 // Run the full export test
408- let req = export_full_profile ( endpoint, RequestSource :: Captured ( server. received_requests ) ) . await ?;
406+ let req =
407+ export_full_profile ( endpoint, RequestSource :: Captured ( server. received_requests ) ) . await ?;
409408
410409 // Validate
411410 validate_full_export ( & req, "/profiling/v1/input" ) ?;
@@ -446,7 +445,8 @@ async fn test_agentless_with_transport(transport: Transport) -> anyhow::Result<(
446445 {
447446 let pipe_path = server. pipe_path . as_ref ( ) . unwrap ( ) ;
448447 // For named pipes, we need to create endpoint manually
449- let endpoint_url = libdd_common:: connector:: named_pipe:: named_pipe_path_to_uri ( pipe_path) ?;
448+ let endpoint_url =
449+ libdd_common:: connector:: named_pipe:: named_pipe_path_to_uri ( pipe_path) ?;
450450 let mut parts = endpoint_url. into_parts ( ) ;
451451 parts. path_and_query = Some ( "/api/v2/profile" . parse ( ) ?) ;
452452 let url = http:: Uri :: from_parts ( parts) ?;
@@ -459,7 +459,8 @@ async fn test_agentless_with_transport(transport: Transport) -> anyhow::Result<(
459459 } ;
460460
461461 // Run the full export test
462- let req = export_full_profile ( endpoint, RequestSource :: Captured ( server. received_requests ) ) . await ?;
462+ let req =
463+ export_full_profile ( endpoint, RequestSource :: Captured ( server. received_requests ) ) . await ?;
463464
464465 // Validate - agentless uses /api/v2/profile path
465466 validate_full_export ( & req, "/api/v2/profile" ) ?;
0 commit comments