From f3c1e14d471c2d99501704b3ebbdc1fda9603120 Mon Sep 17 00:00:00 2001 From: Ryo Yamashita Date: Sun, 23 Aug 2020 20:36:05 +0900 Subject: [PATCH] Fix a cosmetic problem on `WatchSubmissions` --- snowchains_core/CHANGELOG.md | 6 ++++++ snowchains_core/src/web/atcoder.rs | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/snowchains_core/CHANGELOG.md b/snowchains_core/CHANGELOG.md index 82a1e391..4ae44d97 100644 --- a/snowchains_core/CHANGELOG.md +++ b/snowchains_core/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [Unreleased] + +### Fixed + +- Fixed a cosmetic problem on `WatchSubmissions`. + ## [0.4.2] - 2020-08-20Z ### Changed diff --git a/snowchains_core/src/web/atcoder.rs b/snowchains_core/src/web/atcoder.rs index 1603ba80..5c6166d5 100644 --- a/snowchains_core/src/web/atcoder.rs +++ b/snowchains_core/src/web/atcoder.rs @@ -831,7 +831,7 @@ fn print_submissions(mut wtr: impl WriteColor, summaries: &[SubmissionSummary]) wtr.reset()?; write!( wtr, - " │ {:>8} │ {:>9} │", + " │ {:>8} │ {:>10} │", summary.exec_time.as_deref().unwrap_or(""), summary.memory.as_deref().unwrap_or(""), )?; @@ -876,7 +876,7 @@ fn watch_submissions( let pb = mp.add(ProgressBar::new(0)); pb.set_style( - ProgressStyle::default_bar().template("{prefix}{msg:3.bold} │"), + ProgressStyle::default_bar().template("{prefix}{msg:3.bold} │"), ); pb.set_prefix(&format!( @@ -966,7 +966,7 @@ fn watch_submissions( pb.set_style(ProgressStyle::default_bar().template(&format!( "{{prefix}}{{msg:3{style}}} {{pos:>3{style}}}/\ - {{len:>3{style}}} {{bar:14{style}}} │", + {{len:>3{style}}} {{bar:15{style}}} │", style = style(verdict), ))); @@ -1025,7 +1025,7 @@ fn watch_submissions( "{{prefix}}{{msg:3{}}} │ {} │ {} │", verdict.progress_style(), align_right(exec_time, 8), - align_right(memory, 9), + align_right(memory, 10), ))); pb.finish_with_message(&verdict.to_string()); };