Skip to content

Commit

Permalink
Fix confirm
Browse files Browse the repository at this point in the history
  • Loading branch information
DerGoogler committed Oct 23, 2023
1 parent 6c2ef1d commit 3ff02cd
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ use std::cmp::min;
use std::fs::File;
use std::io;
use std::io::prelude::*;
use std::io::{stdout, Seek, Write};
use std::iter::Iterator;
use std::path::Path;
use url::Url;
use zip::ZipArchive;

use std::io::{Seek, Write};
use std::iter::Iterator;
use zip::write::FileOptions;
use zip::ZipArchive;

use walkdir::DirEntry;

Expand Down Expand Up @@ -47,9 +46,9 @@ pub fn get_mmrl_json(path: &str) -> Result<MMRLJSON, serde_json::Error> {

pub fn confirm(msg: &str) -> bool {
loop {
println!("{}", msg);
print!("{}", msg);
let mut input = String::new();

io::stdout().flush().unwrap();
io::stdin()
.read_line(&mut input)
.expect("Failed to read input");
Expand Down

0 comments on commit 3ff02cd

Please sign in to comment.