rust: fix lint warnings about if same then else

Ticket: 4609
pull/8073/head
Gabriel Lima Luz 3 years ago committed by Victor Julien
parent 9cd00424c3
commit 4e90d17fd9

@ -134,7 +134,8 @@ pub fn http2_range_open(
if v.end <= 0 || v.size <= 0 {
// skipped for incomplete range information
return;
} else if v.end == v.size - 1 && v.start == 0 {
}
if v.end == v.size - 1 && v.start == 0 {
// whole file in one range
return;
}

@ -36,7 +36,6 @@
#![allow(clippy::extra_unused_lifetimes)]
#![allow(clippy::field_reassign_with_default)]
#![allow(clippy::for_loops_over_fallibles)]
#![allow(clippy::if_same_then_else)]
#![allow(clippy::manual_find)]
#![allow(clippy::match_like_matches_macro)]
#![allow(clippy::match_ref_pats)]

@ -1669,13 +1669,13 @@ pub unsafe extern "C" fn rs_nfs_tx_get_alstate_progress(tx: *mut std::os::raw::c
{
let tx = cast_pointer!(tx, NFSTransaction);
if direction == Direction::ToServer.into() && tx.request_done {
//SCLogNotice!("TOSERVER progress 1");
SCLogDebug!("TOSERVER progress 1");
return 1;
} else if direction == Direction::ToClient.into() && tx.response_done {
//SCLogNotice!("TOCLIENT progress 1");
SCLogDebug!("TOCLIENT progress 1");
return 1;
} else {
//SCLogNotice!("{} progress 0", direction);
SCLogDebug!("{} progress 0", direction);
return 0;
}
}

Loading…
Cancel
Save