Skip to content

Commit 0a3f3a3

Browse files
committed
address cargo fmt CI problems
1 parent cf8432f commit 0a3f3a3

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

src/benchmark.rs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ impl<'a> std::fmt::Display for BenchmarkConfigDisplay<'a> {
9595
writeln!(f, " PMQ Priority: {}", self.config.pmq_priority)?;
9696
}
9797

98-
99-
10098
let first_message_status = if self.config.include_first_message {
10199
"Included in results"
102100
} else {
@@ -384,7 +382,6 @@ impl BenchmarkRunner {
384382
transport_config: &transport_config,
385383
}
386384
);
387-
388385

389386
// Initialize results structure with test configuration
390387
let mut results = BenchmarkResults::new(
@@ -717,7 +714,6 @@ impl BenchmarkRunner {
717714
} else if received >= msg_count_server {
718715
break;
719716
}
720-
}
721717

722718
// Try to receive with a shorter timeout to avoid hanging
723719
match timeout(Duration::from_millis(50), transport.receive()).await {
@@ -905,7 +901,13 @@ impl BenchmarkRunner {
905901
if start_time.elapsed() >= dur {
906902
break;
907903
}
908-
} else if received >= if include_first_message { msg_count } else { msg_count + 1 } {
904+
} else if received
905+
>= if include_first_message {
906+
msg_count
907+
} else {
908+
msg_count + 1
909+
}
910+
{
909911
break;
910912
}
911913

@@ -985,11 +987,8 @@ impl BenchmarkRunner {
985987
}
986988

987989
// Try to receive response with timeout
988-
match tokio::time::timeout(
989-
Duration::from_millis(50),
990-
client_transport.receive(),
991-
)
992-
.await
990+
match tokio::time::timeout(Duration::from_millis(50), client_transport.receive())
991+
.await
993992
{
994993
Ok(Ok(_)) => {
995994
let latency = send_time.elapsed();

src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ pub fn parse_duration_micros(s: &str) -> Result<Duration, String> {
642642
if s.is_empty() {
643643
return Err("Duration cannot be empty".to_string());
644644
}
645-
645+
646646
// Parse the numeric part and unit suffix
647647
let (num_str, unit) = if let Some(stripped) = s.strip_suffix("us") {
648648
(stripped, "us")

0 commit comments

Comments
 (0)