Skip to content

Commit feb3591

Browse files
committed
fix clippy: remove unnecessary len as u64 cast
Signed-off-by: danbugs <danilochiarlone@gmail.com>
1 parent cdafef6 commit feb3591

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

host/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,7 +1578,7 @@ fn sparsify_snapshot(path: &Path) -> Result<()> {
15781578
drop(mmap);
15791579

15801580
if punched > 0 {
1581-
let disk_mib = (len as u64 - punched * PAGE as u64) / 1024 / 1024;
1581+
let disk_mib = (len - punched * PAGE as u64) / 1024 / 1024;
15821582
eprintln!(" sparsified: {disk_mib} MiB on disk (punched {punched} zero pages)",);
15831583
}
15841584

@@ -1666,7 +1666,7 @@ fn sparsify_snapshot(path: &Path) -> Result<()> {
16661666
drop(mmap);
16671667

16681668
if punched > 0 {
1669-
let disk_mib = (len as u64 - punched * PAGE as u64) / 1024 / 1024;
1669+
let disk_mib = (len - punched * PAGE as u64) / 1024 / 1024;
16701670
eprintln!(" sparsified: {disk_mib} MiB on disk (punched {punched} zero pages)",);
16711671
}
16721672

0 commit comments

Comments
 (0)