From ac5f323e2d0365c1704d0831db2a25454e2dc087 Mon Sep 17 00:00:00 2001 From: Avril Date: Fri, 24 Jul 2020 08:05:51 +0100 Subject: [PATCH] tp --- Cargo.toml | 5 ++--- src/work_async.rs | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b88ecd1..62aafbf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,13 +10,12 @@ edition = "2018" async = ["tokio"] [profile.release] -opt-level = 1 # opt-level >1 causes strange bug in regards to size of memory map??? it still happens on one just not as much???? -# To test map a large file in /tmp a bunch of times and hash it. +opt-level = 3 lto = "fat" codegen-units = 1 [dependencies] -termprogress = { path = "../termprogress" } +termprogress = "0.1.0" lazy_static = "1.4" tokio = {version = "0.2", features= ["full"], optional=true} reqwest = {version = "0.10", features= ["stream"]} diff --git a/src/work_async.rs b/src/work_async.rs index b5000ab..194543c 100644 --- a/src/work_async.rs +++ b/src/work_async.rs @@ -68,6 +68,7 @@ pub async fn perform(url: impl AsRef, path: impl AsRef, progress: &mu prog_send!(progress.bump(slice.len() as u64)); } } + file.flush().await?; if len.is_none() { prog_send!(progress.bump(1)); }