Fix deepsource issue

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/14/head
trivernis 3 years ago
parent 5ecaadd0c8
commit 598792aeb7
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -50,10 +50,7 @@ pub async fn get_folder_size(path: PathBuf) -> RepoResult<u64> {
let futures = all_files.into_iter().map(|f| read_file_size(f)); let futures = all_files.into_iter().map(|f| read_file_size(f));
let results = future::join_all(futures).await; let results = future::join_all(futures).await;
let size = results let size = results.into_iter().filter_map(|r| r.ok()).sum();
.into_iter()
.filter_map(|r| r.ok())
.fold(0u64, |acc, val| acc + val);
Ok(size) Ok(size)
} }

Loading…
Cancel
Save