Skip to content

Commit 013b48f

Browse files
committed
fix clippy errors
Remove some unnecessary map() calls. Signed-off-by: Liu Bo <bo.liu@linux.alibaba.com>
1 parent 126cf6b commit 013b48f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/api/vfs.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ impl FileSystem for Vfs {
431431
) -> Result<(libc::stat64, Duration)> {
432432
match self.get_real_rootfs(inode)? {
433433
(Left(fs), idata) => fs.getattr(ctx, idata.ino, handle),
434-
(Right(fs), idata) => fs.getattr(ctx, idata.ino, handle.map(|h| h)),
434+
(Right(fs), idata) => fs.getattr(ctx, idata.ino, handle),
435435
}
436436
}
437437

@@ -445,7 +445,7 @@ impl FileSystem for Vfs {
445445
) -> Result<(libc::stat64, Duration)> {
446446
match self.get_real_rootfs(inode)? {
447447
(Left(fs), idata) => fs.setattr(ctx, idata.ino, attr, handle, valid),
448-
(Right(fs), idata) => fs.setattr(ctx, idata.ino, attr, handle.map(|h| h), valid),
448+
(Right(fs), idata) => fs.setattr(ctx, idata.ino, attr, handle, valid),
449449
}
450450
}
451451

@@ -587,7 +587,7 @@ impl FileSystem for Vfs {
587587
fs.create(ctx, idata.ino, name, mode, flags, umask)
588588
.map(|(mut a, b, c)| {
589589
a.inode = self.hash_inode(idata.super_index, a.inode)?;
590-
Ok((a, b.map(|h| h), c))
590+
Ok((a, b, c))
591591
})?
592592
}
593593
}

0 commit comments

Comments
 (0)