diff --git a/src/uu/du/src/du.rs b/src/uu/du/src/du.rs index a35e9f77e..3681668f0 100644 --- a/src/uu/du/src/du.rs +++ b/src/uu/du/src/du.rs @@ -555,7 +555,7 @@ impl StatPrinter { size, uucore::format::human::SizeFormat::Binary, ), - SizeFormat::BlockSize(block_size) => div_ceil(size, block_size).to_string(), + SizeFormat::BlockSize(block_size) => size.div_ceil(block_size).to_string(), } } @@ -576,13 +576,6 @@ impl StatPrinter { } } -// This can be replaced with u64::div_ceil once it is stabilized. -// This implementation approach is optimized for when `b` is a constant, -// particularly a power of two. -pub fn div_ceil(a: u64, b: u64) -> u64 { - (a + b - 1) / b -} - // Read file paths from the specified file, separated by null characters fn read_files_from(file_name: &str) -> Result, std::io::Error> { let reader: Box = if file_name == "-" {