Skip to content

Commit

Permalink
Add flush to the last write
Browse files Browse the repository at this point in the history
  • Loading branch information
Sh1Yo committed May 22, 2023
1 parent c73b92f commit 408e6bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ async fn init() -> Result<(), Box<dyn Error>> {
.parse_output(&config);

if output_file.is_some() {
output_file.unwrap().write_all(output.as_bytes()).await?;
output_file.as_mut().unwrap().write_all(output.as_bytes()).await?;
output_file.as_mut().unwrap().flush().await?;
}

write!(io::stdout(), "\n{}", output).ok();
Expand Down

0 comments on commit 408e6bd

Please sign in to comment.