diff --git a/rust/src/lib.rs b/rust/src/lib.rs index c350d67f91..137f97c2d1 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -28,7 +28,6 @@ #![allow(clippy::too_many_arguments)] // To be fixed, but remove the noise for now. -#![allow(clippy::field_reassign_with_default)] #![allow(clippy::manual_find)] #![allow(clippy::match_like_matches_macro)] #![allow(clippy::module_inception)] diff --git a/rust/src/snmp/snmp.rs b/rust/src/snmp/snmp.rs index f1e58ded4a..7df58d45f0 100644 --- a/rust/src/snmp/snmp.rs +++ b/rust/src/snmp/snmp.rs @@ -117,8 +117,10 @@ impl<'a> State> for SNMPState<'a> { impl<'a> SNMPState<'a> { fn add_pdu_info(&mut self, pdu: &SnmpPdu<'a>, tx: &mut SNMPTransaction<'a>) { - let mut pdu_info = SNMPPduInfo::default(); - pdu_info.pdu_type = pdu.pdu_type(); + let mut pdu_info = SNMPPduInfo { + pdu_type: pdu.pdu_type(), + ..Default::default() + }; match *pdu { SnmpPdu::Generic(ref pdu) => { pdu_info.err = pdu.err;