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.
pull/4062/head
Shivani Bhardwaj 6 years ago committed by Victor Julien
parent 477328f79b
commit bbfd706e1f

@ -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) {

Loading…
Cancel
Save