Compare commits

...

5 commits

Author SHA1 Message Date
liv 18d0f3411f
Merge pull request #1902 from rust-lang/all-contributors/add-kazu728
docs: add kazu728 as a contributor for code
2024-03-17 13:19:44 +01:00
allcontributors[bot] e1fa6cf30b
docs: update .all-contributorsrc [skip ci] 2024-03-17 12:19:37 +00:00
allcontributors[bot] a07172a069
docs: update AUTHORS.md [skip ci] 2024-03-17 12:19:36 +00:00
liv 32d2c38aa2
Merge pull request #1899 from kazu728/fix-verify-stdout-buffering
show stdout of the final line
2024-03-17 13:19:20 +01:00
Kazuki Matsuo 80388c042b
fix(verify): show stdout of the last line 2024-03-16 13:56:34 +09:00
3 changed files with 19 additions and 0 deletions

View file

@ -2676,6 +2676,15 @@
"contributions": [
"content"
]
},
{
"login": "kazu728",
"name": "Kazuki Matsuo",
"avatar_url": "https://avatars.githubusercontent.com/u/34614358?v=4",
"profile": "https://github.com/kazu728",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 8,

View file

@ -377,6 +377,7 @@ authors.
<td align="center" valign="top" width="12.5%"><a href="https://github.com/parnavh"><img src="https://avatars.githubusercontent.com/u/45985534?v=4?s=100" width="100px;" alt="Parnav Harinathan"/><br /><sub><b>Parnav Harinathan</b></sub></a><br /><a href="#content-parnavh" title="Content">🖋</a></td>
<td align="center" valign="top" width="12.5%"><a href="https://github.com/0Ahmed-0"><img src="https://avatars.githubusercontent.com/u/111569638?v=4?s=100" width="100px;" alt="0Ahmed-0"/><br /><sub><b>0Ahmed-0</b></sub></a><br /><a href="#content-0Ahmed-0" title="Content">🖋</a></td>
<td align="center" valign="top" width="12.5%"><a href="https://github.com/guizo792"><img src="https://avatars.githubusercontent.com/u/95940388?v=4?s=100" width="100px;" alt="guizo792"/><br /><sub><b>guizo792</b></sub></a><br /><a href="#content-guizo792" title="Content">🖋</a></td>
<td align="center" valign="top" width="12.5%"><a href="https://github.com/kazu728"><img src="https://avatars.githubusercontent.com/u/34614358?v=4?s=100" width="100px;" alt="Kazuki Matsuo"/><br /><sub><b>Kazuki Matsuo</b></sub></a><br /><a href="https://github.com/rust-lang/rustlings/commits?author=kazu728" title="Code">💻</a></td>
</tr>
</tbody>
</table>

View file

@ -38,6 +38,15 @@ pub fn verify<'a>(
percentage += 100.0 / total as f32;
bar.inc(1);
bar.set_message(format!("({:.1} %)", percentage));
if bar.position() == total as u64 {
println!(
"Progress: You completed {} / {} exercises ({:.1} %).",
bar.position(),
total,
percentage
);
bar.finish();
}
}
Ok(())
}