pub fn prompt(msg: &str) -> String {
    print!("{}", msg);
    let mut input = String::new();
    io::stdout().flush().expect("Failed to flush stdout");
    io::stdin()
        .read_line(&mut input)
        .expect("Failed to read line");
    input.truncate(input.len() - 1);
    input
}
/// Prints a message to stdout and reads a line of input from stdin with the new-line char
/// truncated
Prints a message to stdout and reads a line of input from stdin with the new-line char
truncated
Prints a message to stdout and reads a line of input from stdin with the new - line char truncated
pub fn prompt(msg: &str) -> String {
    print!("{}", msg);
    let mut input = String::new();
    io::stdout().flush().expect("Failed to flush stdout");
    io::stdin()
        .read_line(&mut input)
        .expect("Failed to read line");
    input.truncate(input.len() - 1);
    input
}
pub fn prompt ( msg : & str ) -> String { print ! ( " " msg ) ; let mut input = String :: new ( ) ; io :: stdout ( ) . flush ( ) . expect ( " " ) ; io :: stdin ( ) . read_line ( & mut input ) . expect ( " " ) ; input . truncate ( input . len ( ) - 1 ) ; input }
Prints a message to stdout and reads a line of input from stdin with the new-line char
truncated
Prints a message to stdout and reads a line of input from stdin with the new - line char truncated
msg
&str