From e5f1595b98345df6a7cc60fa42a483767704d85e Mon Sep 17 00:00:00 2001 From: Avril Date: Thu, 8 Oct 2020 14:26:52 +0100 Subject: [PATCH] flush --- Cargo.lock | 2 +- src/save.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 583238c..928fb90 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -605,7 +605,7 @@ dependencies = [ [[package]] name = "markov" -version = "0.2.0" +version = "0.3.0" dependencies = [ "cfg-if 1.0.0", "futures", diff --git a/src/save.rs b/src/save.rs index fa8461c..a824774 100644 --- a/src/save.rs +++ b/src/save.rs @@ -55,6 +55,7 @@ async fn save_now_to(chain: &Chain, to: impl AsRef) -> io::Result< let mut file = AsyncWriteCompressor::new(file, PreferencesBuilder::new() .compression_level(lz4f::CLEVEL_HIGH).build())?; file.write_all(&chain[..]).await?; + file.flush().await?; file.shutdown().await?; Ok(()) }