mirror of
https://github.com/notohh/rustlings.git
synced 2024-11-21 21:42:23 -05:00
Fix shift of first output line
This commit is contained in:
parent
f034899c7f
commit
a46d66134b
1 changed files with 3 additions and 0 deletions
|
@ -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<()> {
|
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))?;
|
self.writer.execute(Clear(ClearType::All))?;
|
||||||
|
|
||||||
if let Some(stdout) = &self.stdout {
|
if let Some(stdout) = &self.stdout {
|
||||||
|
|
Loading…
Reference in a new issue