From 1649a53944a2237ea17f53dd21af78587f0295da Mon Sep 17 00:00:00 2001 From: Bryan Gurney Date: Thu, 8 Feb 2024 10:56:25 -0500 Subject: [PATCH 1/2] device_remove: allow blocks in conditions Signed-off-by: Bryan Gurney --- src/core/dm.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/dm.rs b/src/core/dm.rs index e9339e74..28974301 100644 --- a/src/core/dm.rs +++ b/src/core/dm.rs @@ -381,6 +381,7 @@ impl DM { /// Valid flags: `DM_DEFERRED_REMOVE` pub fn device_remove(&self, id: &DevId<'_>, options: DmOptions) -> DmResult { debug!("Removing device {}", id); + #[allow(clippy::blocks_in_conditions)] match retry_with_index( Fixed::from_millis(DM_REMOVE_MSLEEP_DELAY).take(DM_REMOVE_RETRIES - 1), |i| { From 9a6566dcc25fb89a2e525c566ca1d6756713aefc Mon Sep 17 00:00:00 2001 From: Bryan Gurney Date: Thu, 8 Feb 2024 11:21:18 -0500 Subject: [PATCH 2/2] Use old lint name blocks_in_if_conditions Signed-off-by: Bryan Gurney --- src/core/dm.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/dm.rs b/src/core/dm.rs index 28974301..e5b05cd0 100644 --- a/src/core/dm.rs +++ b/src/core/dm.rs @@ -381,7 +381,8 @@ impl DM { /// Valid flags: `DM_DEFERRED_REMOVE` pub fn device_remove(&self, id: &DevId<'_>, options: DmOptions) -> DmResult { debug!("Removing device {}", id); - #[allow(clippy::blocks_in_conditions)] + #[allow(renamed_and_removed_lints)] + #[allow(clippy::blocks_in_if_conditions)] match retry_with_index( Fixed::from_millis(DM_REMOVE_MSLEEP_DELAY).take(DM_REMOVE_RETRIES - 1), |i| {