mirror of
https://github.com/notohh/rustlings.git
synced 2024-12-22 00:18:09 -05:00
Trim the final message
This commit is contained in:
parent
8aef915ee7
commit
070a780d7f
1 changed files with 6 additions and 2 deletions
|
@ -228,8 +228,12 @@ impl AppState {
|
|||
|
||||
writer.execute(Clear(ClearType::All))?;
|
||||
writer.write_all(FENISH_LINE.as_bytes())?;
|
||||
writer.write_all(self.final_message.as_bytes())?;
|
||||
writer.write_all(b"\n")?;
|
||||
|
||||
let final_message = self.final_message.trim();
|
||||
if !final_message.is_empty() {
|
||||
writer.write_all(self.final_message.as_bytes())?;
|
||||
writer.write_all(b"\n")?;
|
||||
}
|
||||
|
||||
return Ok(ExercisesProgress::AllDone);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue