From ff5c9da9f14cb1658cf9ecf9966dab5582a8ce5e Mon Sep 17 00:00:00 2001 From: Victor Brekenfeld Date: Tue, 24 Sep 2024 09:55:29 +0200 Subject: [PATCH] chore: Fix new 1.66.0 clippy lints --- drm-ffi/src/mode.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drm-ffi/src/mode.rs b/drm-ffi/src/mode.rs index 1b30b8f..2fe66d3 100644 --- a/drm-ffi/src/mode.rs +++ b/drm-ffi/src/mode.rs @@ -396,7 +396,7 @@ pub fn get_connector( } else { &tmp_mode as *const _ as _ }, - count_modes: if force_probe { 0 } else { 1 }, + count_modes: u32::from(!force_probe), ..Default::default() }; @@ -427,13 +427,7 @@ pub fn get_connector( prop_values_ptr: map_ptr!(&prop_values), count_modes: match &modes { Some(b) => b.capacity() as _, - None => { - if force_probe { - 0 - } else { - 1 - } - } + None => u32::from(!force_probe), }, count_props: map_len!(&props), count_encoders: map_len!(&encoders),