From: Ian Jackson Date: Sat, 15 May 2021 00:00:51 +0000 (+0100) Subject: progress: Minor presentation improvements X-Git-Tag: otter-0.6.0~302 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=4b6d06ba60bc01ee816a27fef14379117a96f8a3;p=otter.git progress: Minor presentation improvements Signed-off-by: Ian Jackson --- diff --git a/src/progress.rs b/src/progress.rs index 7c7e5a13..5724d1c0 100644 --- a/src/progress.rs +++ b/src/progress.rs @@ -64,7 +64,7 @@ impl From for Count<'static> where T: Enum { fn from(t: T) -> Count<'static> { Count { i: t.to_usize().unwrap(), - n: T::COUNT, + n: T::COUNT - 1, // Show be Borrowed https://github.com/Peternator7/strum/issues/159 desc: Cow::Owned(t.get_message().unwrap_or("...").to_owned()), } @@ -145,7 +145,7 @@ impl<'oo,'o,R:Read> ReadOriginator<'oo,'o,R> { .chars().rev() .collect::() }; - let desc = format!("{} / {}", m(c), m(t)); + let desc = format!(" {} / {}", m(c), m(t)); self.orig.item(self.counter, desc); self.last_report = self.counter; }