Skip to content

Commit 09d53e7

Browse files
committed
fix cargo clippy warnning
Signed-off-by: tianqian.zyf <tianqian.zyf@alibaba-inc.com>
1 parent bd09a18 commit 09d53e7

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/api/filesystem/overlay.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ pub(crate) fn is_chardev(st: stat64) -> bool {
195195
pub(crate) fn is_whiteout(st: stat64) -> bool {
196196
// A whiteout is created as a character device with 0/0 device number.
197197
// See ref: https://docs.kernel.org/filesystems/overlayfs.html#whiteouts-and-opaque-directories
198-
let major = unsafe { libc::major(st.st_rdev) };
199-
let minor = unsafe { libc::minor(st.st_rdev) };
198+
let major = libc::major(st.st_rdev);
199+
let minor = libc::minor(st.st_rdev);
200200
is_chardev(st) && major == 0 && minor == 0
201201
}
202202

src/api/vfs/sync_io.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -306,9 +306,7 @@ impl FileSystem for Vfs {
306306
}
307307
match self.get_real_rootfs(inode)? {
308308
(Left(fs), idata) => fs.open(ctx, idata.ino(), flags, fuse_flags),
309-
(Right(fs), idata) => fs
310-
.open(ctx, idata.ino(), flags, fuse_flags)
311-
.map(|(h, opt, passthrough)| (h.map(Into::into), opt, passthrough)),
309+
(Right(fs), idata) => fs.open(ctx, idata.ino(), flags, fuse_flags),
312310
}
313311
}
314312

@@ -522,9 +520,7 @@ impl FileSystem for Vfs {
522520
}
523521
match self.get_real_rootfs(inode)? {
524522
(Left(fs), idata) => fs.opendir(ctx, idata.ino(), flags),
525-
(Right(fs), idata) => fs
526-
.opendir(ctx, idata.ino(), flags)
527-
.map(|(h, opt)| (h.map(Into::into), opt)),
523+
(Right(fs), idata) => fs.opendir(ctx, idata.ino(), flags),
528524
}
529525
}
530526

0 commit comments

Comments
 (0)