@@ -95,7 +95,8 @@ impl PingResultProcessor for PingResultProcessorLatencyScatterLogger {
95
95
last_iteration_results. bitmask |= bit_mask_bit;
96
96
97
97
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 ;
99
100
}
100
101
101
102
break ;
@@ -122,9 +123,10 @@ impl PingResultProcessor for PingResultProcessorLatencyScatterLogger {
122
123
for ( port_bucket, latency_hits) in iteration {
123
124
print ! ( "{:>7} | {:>8} | " , iteration_index, port_bucket) ;
124
125
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
+ ) ;
128
130
println ! ( "{}" , result) ;
129
131
}
130
132
}
@@ -134,6 +136,7 @@ impl PingResultProcessor for PingResultProcessorLatencyScatterLogger {
134
136
#[ cfg( test) ]
135
137
mod tests {
136
138
use super :: * ;
139
+ use pretty_assertions:: assert_eq;
137
140
138
141
#[ test]
139
142
fn convert_result_info_to_string_should_work ( ) {
@@ -170,9 +173,9 @@ mod tests {
170
173
171
174
assert_eq ! (
172
175
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 - - - - - " ,
176
179
] ,
177
180
formatted_results
178
181
) ;
0 commit comments