Re: [PATCH 2/2] rust: allow `clippy::collapsible_if` globally

From: Gary Guo

Date: Mon Apr 27 2026 - 09:21:19 EST


On Sun Apr 26, 2026 at 3:42 PM BST, Miguel Ojeda wrote:
> 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@xxxxxxxxxxxxxxx # Needed in 6.12.y and later (Rust is pinned in older LTSs).
> Suggested-by: Gary Guo <gary@xxxxxxxxxxx>
> Link: https://lore.kernel.org/rust-for-linux/DGROP5CHU1QZ.1OKJRAUZXE9WC@xxxxxxxxxxx/
> Link: https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [1]
> Signed-off-by: Miguel Ojeda <ojeda@xxxxxxxxxx>

Reviewed-by: Gary Guo <gary@xxxxxxxxxxx>

> ---
> Makefile | 1 +
> drivers/android/binder/range_alloc/array.rs | 1 -
> 2 files changed, 1 insertion(+), 1 deletion(-)