mirror of
https://github.com/rust-lang/rustlings.git
synced 2024-12-26 00:00:03 +03:00
Fix shift of first output line
This commit is contained in:
parent
f034899c7f
commit
a46d66134b
|
@ -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