if info.err.0 != 0 {
js.set_string("error", &format!("{:?}", info.err));
}
- match &info.trap_type {
- Some((trap_type, oid, address)) => {
+ match info.trap_type {
+ Some((trap_type, ref oid, address)) => {
js.set_string("trap_type", &format!("{:?}", trap_type));
js.set_string("trap_oid", &oid.to_string());
match address {
fn add_pdu_info(&mut self, pdu: &SnmpPdu, tx: &mut SNMPTransaction) {
let mut pdu_info = SNMPPduInfo::default();
pdu_info.pdu_type = pdu.pdu_type();
- match pdu {
+ match *pdu {
SnmpPdu::Generic(ref pdu) => {
pdu_info.err = pdu.err;
},