Conversation
|
|
||
| fn close_flow(&mut self, _timestamp_us: i64, _cause: FlowExpireCause) -> () { | ||
| // No active state to close | ||
| fn close_flow(&mut self, _timestamp_us: i64, cause: FlowExpireCause) -> () { |
Check warning
Code scanning / clippy
unneeded unit return type Warning
| fn get_features() -> String { | ||
| // Add here the features of the custom flow. | ||
| format!("flow_id,icmp_type,icmp_code") | ||
| format!("flow_id,icmp_type,icmp_code,icmp_echo_request_count,icmp_echo_reply_count,icmp_error_count,icmp_destination_unreachable_count") |
Check warning
Code scanning / clippy
useless use of format! Warning
| fn get_features_without_contamination() -> String { | ||
| // Add here the features of the custom flow without contaminant features. | ||
| format!("icmp_type,icmp_code") | ||
| format!("icmp_type,icmp_code,icmp_echo_request_count,icmp_echo_reply_count,icmp_error_count,icmp_destination_unreachable_count") |
Check warning
Code scanning / clippy
useless use of format! Warning
| self.error_count += 1; | ||
| self.destination_unreachable_count += 1; | ||
| } | ||
| Some(2 | 3 | 4) => self.error_count += 1, |
Check warning
Code scanning / clippy
this OR pattern can be rewritten using a range Warning
| let packet_counter_clone = Arc::clone(&packet_counter); | ||
| let packet_tx_clone = packet_tx.clone(); | ||
| let packet_graph = packet_graph.clone(); | ||
| let realtime_offset_us = realtime_offset_us; |
Check warning
Code scanning / clippy
redundant redefinition of a binding realtime_offset_us Warning
| let packet_counter_clone = Arc::clone(&packet_counter); | ||
| let packet_tx_clone = packet_tx.clone(); | ||
| let packet_graph = packet_graph.clone(); | ||
| let realtime_offset_us = realtime_offset_us; |
Check warning
Code scanning / clippy
redundant redefinition of a binding realtime_offset_us Warning
Cleanup, testing, polish, minor new features and improvements