1
0
mirror of https://github.com/rust-lang/rustlings.git synced 2024-09-16 10:51:42 +02:00

Fix shift of first output line

This commit is contained in:
mo8it 2024-04-10 03:56:41 +02:00
parent f034899c7f
commit a46d66134b

View File

@ -127,6 +127,9 @@ You can keep working on this exercise or jump into the next one by removing the
}
pub fn render(&mut self) -> Result<()> {
// Prevent having the first line shifted after clearing because of the prompt.
self.writer.write_all(b"\n")?;
self.writer.execute(Clear(ClearType::All))?;
if let Some(stdout) = &self.stdout {