mirror of
https://github.com/rust-lang/rustlings.git
synced 2025-06-15 00:04:58 +02:00
Trim the final message
This commit is contained in:
@ -228,8 +228,12 @@ impl AppState {
|
||||
|
||||
writer.execute(Clear(ClearType::All))?;
|
||||
writer.write_all(FENISH_LINE.as_bytes())?;
|
||||
|
||||
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);
|
||||
};
|
||||
|
Reference in New Issue
Block a user