commented out u16_input function

This commit is contained in:
Zastian Pretorius
2022-07-10 22:35:30 +01:00
parent db1ab32120
commit 7c8ec33d05

View File

@@ -26,12 +26,12 @@ pub fn int_input(prompt: &str) -> usize {
}
}
pub fn u16_input(prompt: &str) -> u16 {
print!("{}", prompt);
let mut input = String::new();
let _ = io::stdout().flush();
io::stdin()
.read_line(&mut input)
.expect("Error reading from STDIN");
input.trim().parse::<u16>().unwrap()
}
//pub fn u16_input(prompt: &str) -> u16 {
// print!("{}", prompt);
// let mut input = String::new();
// let _ = io::stdout().flush();
// io::stdin()
// .read_line(&mut input)
// .expect("Error reading from STDIN");
// input.trim().parse::<u16>().unwrap()
//}