Skip to main content

parse_yes_no

Function parse_yes_no 

Source
pub fn parse_yes_no(line: &str, default: Option<bool>) -> Option<bool>
Expand description

Parse one yes/no reply. "" (a bare Enter) means “keep default”, and is only an ANSWER when there already is one — otherwise the caller must re-ask, because silence is exactly what D-8 forbids.