rust/modbus: derive default instead of manual impl

Cleans up a clippy lint for a trivial default impl that can be derived.
pull/7966/head
Jason Ish 3 years ago committed by Victor Julien
parent 9218da0eb8
commit 45dfea2497

@ -46,7 +46,7 @@ lazy_static! {
.unwrap();
}
#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Default)]
pub struct DetectModbusRust {
category: Option<Flags<CodeCategory>>,
function: Option<FunctionCode>,
@ -57,20 +57,6 @@ pub struct DetectModbusRust {
value: Option<Range<u16>>,
}
impl Default for DetectModbusRust {
fn default() -> Self {
DetectModbusRust {
category: None,
function: None,
subfunction: None,
access_type: None,
unit_id: None,
address: None,
value: None,
}
}
}
/// Compares a range from the alert signature to the transaction's unit_id/address/value
/// range. If the signature's range intersects with the transaction, it is a match and true is
/// returned.

Loading…
Cancel
Save