From 05567ba647a82c66159c92615021654b066baaf2 Mon Sep 17 00:00:00 2001 From: mulhern Date: Thu, 5 Sep 2024 13:48:08 -0400 Subject: [PATCH] Remove obsolete allows The lowest version of libc that devicemapper can use is 0.2.155. The makedev function is no longer unsafe in any version of libc that devicemapper can depend on transitively. Signed-off-by: mulhern --- src/core/device.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/core/device.rs b/src/core/device.rs index 1a618027..4c1eed83 100644 --- a/src/core/device.rs +++ b/src/core/device.rs @@ -72,9 +72,8 @@ impl From for Device { impl From for dev_t { fn from(dev: Device) -> dev_t { #[cfg(target_os = "android")] - #[allow(unused_unsafe)] // No longer unsafe in libc 0.2.133. #[allow(clippy::useless_conversion)] // Param types u32 in libc 0.2.133 - unsafe { + { makedev( dev.major .try_into() @@ -85,10 +84,7 @@ impl From for dev_t { ) } #[cfg(not(target_os = "android"))] - #[allow(unused_unsafe)] // No longer unsafe in libc 0.2.133. - unsafe { - makedev(dev.major, dev.minor) - } + makedev(dev.major, dev.minor) } }