Skip to content

Commit

Permalink
Remove obsolete allows
Browse files Browse the repository at this point in the history
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 <amulhern@redhat.com>
  • Loading branch information
mulkieran committed Sep 5, 2024
1 parent 8b262df commit 05567ba
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/core/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,8 @@ impl From<dev_t> for Device {
impl From<Device> 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()
Expand All @@ -85,10 +84,7 @@ impl From<Device> 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)
}
}

Expand Down

0 comments on commit 05567ba

Please sign in to comment.