Skip to content

Commit 5f62128

Browse files
committed
Remove a workaround that's no longer necessary now that we read input on a new line
1 parent 0a2b894 commit 5f62128

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/write.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use std::fs;
2-
use std::io::{self, Write};
2+
use std::io;
33
use std::path::PathBuf;
44

55
use log::{error, info, warn};
@@ -19,9 +19,6 @@ impl Module {
1919
// A prompt enabling the user to overwrite the existing file
2020
warn!("File already exists: {}", full_path.display());
2121
warn!("Do you want to overwrite it? [y/N] ");
22-
// We must manually flush the buffer or else the printed string doesn't appear.
23-
// The buffer otherwise waits for a newline.
24-
io::stdout().flush().unwrap();
2522

2623
let mut answer = String::new();
2724

0 commit comments

Comments
 (0)