From: Victor Julien Date: Fri, 23 Oct 2020 05:45:50 +0000 (+0200) Subject: dcerpc/tcp: fix compile warning X-Git-Tag: suricata-6.0.1~87 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f31372ad1d2bd1fd8602c133ec686c5d1e91ff3a;p=thirdparty%2Fsuricata.git dcerpc/tcp: fix compile warning warning: variable does not need to be mutable --> src/dcerpc/dcerpc.rs:1036:42 | 1036 | let tx = if let Some(mut tx) = self.get_tx_by_call_id(current_call_id, core::STREAM_TOCLIENT) { | ----^^ | | | help: remove this `mut` | = note: `#[warn(unused_mut)]` on by default warning: variable does not need to be mutable --> src/dcerpc/dcerpc.rs:1061:30 | 1061 | Some(mut tx) => { | ----^^ | | | help: remove this `mut` --- diff --git a/rust/src/dcerpc/dcerpc.rs b/rust/src/dcerpc/dcerpc.rs index a14a5de2ac..fac3a53397 100644 --- a/rust/src/dcerpc/dcerpc.rs +++ b/rust/src/dcerpc/dcerpc.rs @@ -1033,7 +1033,7 @@ impl DCERPCState { if retval == -1 { return AppLayerResult::err(); } - let tx = if let Some(mut tx) = self.get_tx_by_call_id(current_call_id, core::STREAM_TOCLIENT) { + let tx = if let Some(tx) = self.get_tx_by_call_id(current_call_id, core::STREAM_TOCLIENT) { tx.resp_cmd = x; tx } else { @@ -1058,7 +1058,7 @@ impl DCERPCState { DCERPC_TYPE_RESPONSE => { let transaction = self.get_tx_by_call_id(current_call_id, core::STREAM_TOCLIENT); match transaction { - Some(mut tx) => { + Some(tx) => { tx.resp_cmd = x; } None => {