]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rust: allow `clippy::collapsible_if` globally
authorMiguel Ojeda <ojeda@kernel.org>
Sun, 26 Apr 2026 14:42:01 +0000 (16:42 +0200)
committerMiguel Ojeda <ojeda@kernel.org>
Thu, 30 Apr 2026 21:21:31 +0000 (23:21 +0200)
commit2adc8664018c1cc595c7c0c98474a33c7fe32a85
tree4107a897a62ba0c886e927cf0f1470c186b8d251
parent838d852da8503372f3a1779bfbd1ccb93153ab4e
rust: allow `clippy::collapsible_if` globally

Similar to `clippy::collapsible_match` (globally allowed in the previous
commit), the `clippy::collapsible_if` lint [1] can make code harder to
read in certain cases.

Thus just let developers decide on their own.

In addition, remove the existing `expect` we had.

Cc: stable@vger.kernel.org # Needed in 6.12.y and later (Rust is pinned in older LTSs).
Suggested-by: Gary Guo <gary@garyguo.net>
Link: https://lore.kernel.org/rust-for-linux/DGROP5CHU1QZ.1OKJRAUZXE9WC@garyguo.net/
Link: https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
Reviewed-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260426144201.227108-2-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Makefile
drivers/android/binder/range_alloc/array.rs