Skip to content

Commit b26e156

Browse files
committed
.
1 parent b3d461d commit b26e156

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/ping_result_processors/ping_result_processor_latency_scatter_logger.rs

+10-7
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ impl PingResultProcessor for PingResultProcessorLatencyScatterLogger {
9595
last_iteration_results.bitmask |= bit_mask_bit;
9696

9797
if let None = ping_result.error() {
98-
last_iteration_results.results[col] = ping_result.round_trip_time().as_micros() as f64 / 1000.0;
98+
last_iteration_results.results[col] =
99+
ping_result.round_trip_time().as_micros() as f64 / 1000.0;
99100
}
100101

101102
break;
@@ -122,9 +123,10 @@ impl PingResultProcessor for PingResultProcessorLatencyScatterLogger {
122123
for (port_bucket, latency_hits) in iteration {
123124
print!("{:>7} | {:>8} | ", iteration_index, port_bucket);
124125

125-
let result = PingResultProcessorLatencyScatterLogger::convert_latency_hits_to_string(
126-
latency_hits,
127-
);
126+
let result =
127+
PingResultProcessorLatencyScatterLogger::convert_latency_hits_to_string(
128+
latency_hits,
129+
);
128130
println!("{}", result);
129131
}
130132
}
@@ -134,6 +136,7 @@ impl PingResultProcessor for PingResultProcessorLatencyScatterLogger {
134136
#[cfg(test)]
135137
mod tests {
136138
use super::*;
139+
use pretty_assertions::assert_eq;
137140

138141
#[test]
139142
fn convert_result_info_to_string_should_work() {
@@ -170,9 +173,9 @@ mod tests {
170173

171174
assert_eq!(
172175
vec![
173-
" - - - - - - - - - - ",
174-
" 12.34 - - - - - - - - - ",
175-
" - X 12.34 345.67 234.56 - - - - - ",
176+
" - - - - - - - - - - ",
177+
" 12.34 - - - - - - - - - ",
178+
" - X 12.34 345.67 234.56 - - - - - ",
176179
],
177180
formatted_results
178181
);

0 commit comments

Comments
 (0)