()
| 12 | } |
| 13 | |
| 14 | fn main() { |
| 15 | println!("Type 'quit' to exit."); |
| 16 | let mut input = String::new(); |
| 17 | loop { |
| 18 | io::stdin().read_line(&mut input).unwrap(); |
| 19 | input.truncate(input.len() - 1); // remove trailing newline |
| 20 | |
| 21 | if input == "quit" { |
| 22 | println!("Good bye"); |
| 23 | break; |
| 24 | } |
| 25 | |
| 26 | let is_date = is_proper_date(&input); |
| 27 | //let is_date = iso_8601::is_8601_date(&input); |
| 28 | println!( |
| 29 | "{0} is{1}a date", |
| 30 | input, |
| 31 | if is_date { " " } else { " not " } |
| 32 | ); |
| 33 | input.clear(); |
| 34 | } |
| 35 | } |
nothing calls this directly
no test coverage detected