From d8554e30029bf43dccce72e982784cd01857b0c4 Mon Sep 17 00:00:00 2001 From: fxqnlr Date: Thu, 25 May 2023 22:48:54 +0200 Subject: added mod add progress --- src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index a7a34ac..7287660 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -15,9 +15,10 @@ use error::{ErrorType, MLError, MLE}; use indicatif::{ProgressStyle, ProgressBar}; use serde::{Deserialize, Serialize}; -pub static STYLE_BAR_POS: &str = "{spinner:.green}{wide_msg}{pos}/{len} [{bar:.green/lime}]"; pub static STYLE_BAR_BYTE: &str = "{spinner:.green}{wide_msg}{bytes}/{total_bytes} [{bar:.green/lime}]"; +pub static STYLE_BAR_POS: &str = " {wide_msg}{pos}/{len} [{bar:.green/lime}]"; pub static STYLE_SPINNER: &str = "{spinner:.green}{wide_msg}"; +pub static STYLE_OPERATION: &str = " {wide_msg}"; pub static STYLE_MESSAGE: &str = "{wide_msg}"; pub static PROGRESS_CHARS: &str = "#>-"; @@ -70,7 +71,7 @@ pub async fn check_game_versions(path: &str, force: bool) -> MLE<()> { let creation_time = fs::metadata(path)?.created()?; if !force && creation_time.elapsed().unwrap() < Duration::from_secs(60 * 60 * 24) { return Ok(()); } - std::io::stdout().flush()?; + let versions = get_game_versions().await; remove_file(path)?; let mut file = File::create(path)?; -- cgit v1.2.3