Ok((leftover_bytes, mut back)) => {
if let Some(ref mut bind) = self.bind {
for (uuid_internal_id, r) in back.ctxitems.iter().enumerate() {
- for mut uuid in bind.uuid_list.iter_mut() {
+ for uuid in bind.uuid_list.iter_mut() {
if uuid.internal_id == uuid_internal_id as u16 {
uuid.result = r.ack_result;
if uuid.result != 0 {
//borrow checker forbids to reuse directly tx
let index = self.find_tx_index(sid);
if index > 0 {
- let mut tx_same = &mut self.transactions[index - 1];
+ let tx_same = &mut self.transactions[index - 1];
if dir == Direction::ToServer {
tx_same.ft_tc.tx_id = tx_same.tx_id - 1;
} else {
}
pub fn handle_ikev2(
- mut state: &mut IKEState, current: &[u8], isakmp_header: IsakmpHeader, direction: Direction,
+ state: &mut IKEState, current: &[u8], isakmp_header: IsakmpHeader, direction: Direction,
) -> AppLayerResult {
let hdr = IkeV2Header {
init_spi: isakmp_header.init_spi,
pub fn detect_parse_encryption_weak(i: &str) -> IResult<&str, DetectKrb5TicketEncryptionData> {
let (i, neg) = opt(char('!'))(i)?;
let (i, _) = tag("weak")(i)?;
- let value = match neg {
- Some(_) => false,
- _ => true,
- };
+ let value = neg.is_none();
return Ok((i, DetectKrb5TicketEncryptionData::WEAK(value)));
}
)
-> AppLayerResult
{
- let mut state = cast_pointer!(state, SMBState);
+ let state = cast_pointer!(state, SMBState);
let flow = cast_pointer!(flow, Flow);
if stream_slice.is_gap() {
)
-> AppLayerResult
{
- let mut state = cast_pointer!(state, SMBState);
+ let state = cast_pointer!(state, SMBState);
let flow = cast_pointer!(flow, Flow);
if stream_slice.is_gap() {
fn parse_record(
&mut self, mut input: &[u8], resp: bool, pstate: *mut std::os::raw::c_void,
) -> AppLayerResult {
- let (mut hdr, ohdr) = if !resp {
+ let (hdr, ohdr) = if !resp {
(&mut self.transaction.cli_hdr, &self.transaction.srv_hdr)
} else {
(&mut self.transaction.srv_hdr, &self.transaction.cli_hdr)
fn parse_banner(
&mut self, input: &[u8], resp: bool, pstate: *mut std::os::raw::c_void,
) -> AppLayerResult {
- let mut hdr = if !resp {
+ let hdr = if !resp {
&mut self.transaction.cli_hdr
} else {
&mut self.transaction.srv_hdr