@@ -10,7 +10,7 @@ struct Args {
|
||||
|
||||
fn compute_size(path: PathBuf) -> Result<u64, std::io::Error> {
|
||||
if path.is_dir() {
|
||||
std::fs::read_dir(path)?.try_fold(0_u64, |counter, entry| -> Result<u64, std::io::Error> {
|
||||
std::fs::read_dir(path)?.try_fold(0_u64, |counter, entry| {
|
||||
Ok(counter + compute_size(entry?.path())?)
|
||||
})
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user