From f083558f5f5e977e058050dd2dd8883fbc5755bc Mon Sep 17 00:00:00 2001 From: mulhern Date: Thu, 2 Jan 2025 08:08:20 -0500 Subject: [PATCH] Use reason specifier in allow for unused unsafes Signed-off-by: mulhern --- src/devno.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/devno.rs b/src/devno.rs index 60dcd4d..bcfc948 100644 --- a/src/devno.rs +++ b/src/devno.rs @@ -44,13 +44,13 @@ impl BlkidDevno { /// Create a `BlkidDevno` from major and minor numbers. pub fn from_device_numbers(major: maj_t, minor: min_t) -> Self { - #[allow(unused_unsafe)] // No longer unsafe in libc 0.2.133 + #[allow(unused_unsafe, reason = "No longer unsafe in libc 0.2.133")] BlkidDevno(unsafe { libc::makedev(major, minor) }) } /// Get the major number. pub fn major(&self) -> maj_t { - #[allow(unused_unsafe)] + #[allow(unused_unsafe, reason = "No longer unsafe in libc 0.2.171")] unsafe { libc::major(self.0) } @@ -58,7 +58,7 @@ impl BlkidDevno { /// Get the minor number. pub fn minor(&self) -> min_t { - #[allow(unused_unsafe)] + #[allow(unused_unsafe, reason = "No longer unsafe in libc 0.2.171")] unsafe { libc::minor(self.0) }