use scanln::scanln; fn main() { // Read from stdin with a prompt let some_input = scanln!("Enter prompt: "); println!("\"{}\" was entered", some_input); // Same thing but use the last input as the prompt. // // Also of note is the fact that trailing whitespace in inputs (other than // '\n' and '\r') is preserved. let more_input = scanln!("{}", some_input); println!("\"{}\" was entered", more_input); }