Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8b77b91

Browse files
authored
Add count padding (clearloop#53)
* Add count padding for `leetcode stat`. * Update comments as well.
1 parent 146cd25 commit 8b77b91

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/cmds/stat.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ impl Command for StatCommand {
6767
}
6868

6969
// level: len = 8
70-
// count: len = 8
70+
// count: len = 10
7171
// percent: len = 16
7272
// chart: len = 32
7373
// title
@@ -105,7 +105,7 @@ impl Command for StatCommand {
105105
let count = format!("{}/{}", l.1, l.0);
106106
let pct = format!("( {:.2} %)", checked_div(100.0 * l.1, l.0));
107107
let mut line = "".to_string();
108-
line.push_str(&" ".digit(8 - (count.len() as i32)));
108+
line.push_str(&" ".digit(10 - (count.len() as i32)));
109109
line.push_str(&count);
110110
line.push_str(&" ".digit(12 - (pct.len() as i32)));
111111
line.push_str(&pct);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /