mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
style: Fix clippy
New clippy has new standards. Clean up get_metadata by removing unused return
This commit is contained in:
+4
-4
@@ -29,13 +29,12 @@ pub fn get_metadata<P: AsRef<Path>>(
|
|||||||
Ok(md) => {
|
Ok(md) => {
|
||||||
let file_size = md.len();
|
let file_size = md.len();
|
||||||
if use_apparent_size {
|
if use_apparent_size {
|
||||||
return Some((
|
Some((
|
||||||
file_size,
|
file_size,
|
||||||
Some((md.ino(), md.dev())),
|
Some((md.ino(), md.dev())),
|
||||||
(md.mtime(), md.atime(), md.ctime()),
|
(md.mtime(), md.atime(), md.ctime()),
|
||||||
));
|
))
|
||||||
}
|
} else {
|
||||||
|
|
||||||
// On NTFS mounts, the reported block count can be unexpectedly large.
|
// On NTFS mounts, the reported block count can be unexpectedly large.
|
||||||
// To avoid overestimating disk usage, cap the allocated size to what the
|
// To avoid overestimating disk usage, cap the allocated size to what the
|
||||||
// file should occupy based on the file system I/O block size (blksize).
|
// file should occupy based on the file system I/O block size (blksize).
|
||||||
@@ -58,6 +57,7 @@ pub fn get_metadata<P: AsRef<Path>>(
|
|||||||
(md.mtime(), md.atime(), md.ctime()),
|
(md.mtime(), md.atime(), md.ctime()),
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Err(_e) => None,
|
Err(_e) => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user