Skip to content

Commit c3a7bf8

Browse files
authored
Merge pull request #42 from mulkieran/allow-unused-unsafe
Allow an unused unsafe in two functions
2 parents 4d5e734 + 9a76320 commit c3a7bf8

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ impl LoopDevice {
300300
/// an IO error.
301301
#[allow(clippy::unnecessary_cast)]
302302
pub fn major(&self) -> io::Result<u32> {
303+
#[allow(unused_unsafe)]
303304
self.device
304305
.metadata()
305306
.map(|m| unsafe { libc::major(m.rdev()) })
@@ -314,6 +315,7 @@ impl LoopDevice {
314315
/// an IO error.
315316
#[allow(clippy::unnecessary_cast)]
316317
pub fn minor(&self) -> io::Result<u32> {
318+
#[allow(unused_unsafe)]
317319
self.device
318320
.metadata()
319321
.map(|m| unsafe { libc::minor(m.rdev()) })

0 commit comments

Comments
 (0)