pub fn question(display: &str, default: &str) -> Result<String> {
    println!("{}", display);
    let mut input = String::new();
    stdin().read_line(&mut input)?;

    if input.trim().is_empty() {
        return Ok(default.into());
    }

    Ok(input.trim().to_string())
}
/// Takes a question and a default value, displays the question, and attempts to parse user input to
/// return the relevant value. Will apply the default value when the user line input is empty.
Takes a question and a default value, displays the question, and attempts to parse user input to
return the relevant value. Will apply the default value when the user line input is empty.
Takes a question and a default value displays the question and attempts to parse user input to return the relevant value . Will apply the default value when the user line input is empty .
pub fn question(display: &str, default: &str) -> Result<String> {
    println!("{}", display);
    let mut input = String::new();
    stdin().read_line(&mut input)?;
    if input.trim().is_empty() {
        return Ok(default.into());
    }
    Ok(input.trim().to_string())
}
pub fn question ( display : & str , default : & str ) -> Result < String > { println ! ( " " display ) ; let mut input = String :: new ( ) ; stdin ( ) . read_line ( & mut input ) ? ; if input . trim ( ) . is_empty ( ) { return Ok ( default . into ( ) ) ; } Ok ( input . trim ( ) . to_string ( ) ) }
Takes a question and a default value, displays the question, and attempts to parse user input to
return the relevant value.
Takes a question and a default value displays the question and attempts to parse user input to return the relevant value .
display
&str
default
&str
display
&str
default
&str