From bbfd706e1fd78e838f55345c02218b270ba11276 Mon Sep 17 00:00:00 2001 From: Shivani Bhardwaj Date: Tue, 16 Jul 2019 14:09:13 +0530 Subject: [PATCH] rust: fix compiler warning rustc 1.36 introduced: error: variable does not need to be mutable --> src/dhcp/parser.rs:202:17 | 202 | let mut malformed_options = false; | ----^^^^^^^^^^^^^^^^^ | | | help: remove this `mut` | note: lint level defined here --> src/lib.rs:18:38 | 18 | #![cfg_attr(feature = "strict", deny(warnings))] | ^^^^^^^^ = note: #[deny(unused_mut)] implied by #[deny(warnings)] error: aborting due to previous error error: Could not compile `suricata`. Ticket #3072. --- rust/src/dhcp/parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/src/dhcp/parser.rs b/rust/src/dhcp/parser.rs index 6b7402cd7b..55a1be6037 100644 --- a/rust/src/dhcp/parser.rs +++ b/rust/src/dhcp/parser.rs @@ -199,7 +199,7 @@ pub fn dhcp_parse(input: &[u8]) -> IResult<&[u8], DHCPMessage> { Ok((rem, header)) => { let mut options = Vec::new(); let mut next = rem; - let mut malformed_options = false; + let malformed_options = false; let mut truncated_options = false; loop { match parse_option(next) {