diff options
Diffstat (limited to '')
-rw-r--r-- | src/main.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index eacbeb9..1782953 100644 --- a/src/main.rs +++ b/src/main.rs @@ -101,10 +101,15 @@ fn main() -> Result<(), ureq::Error> { match status.to_station { None => println!("{}: Fahrt ins {}", traveltext, "Blaue".blue()), - Some(to) => { + Some(to) if status.checked_in => { let now = chrono::Utc::now(); let duration = to.real_arrival().map(|dt| *dt - now); match duration { + Some(d) if d < chrono::Duration::zero() => println!( + "{}: {}", + traveltext, + "we should be there already!".green() + ), Some(d) => println!( "{}: we'll be there in {} minutes", traveltext, @@ -113,6 +118,11 @@ fn main() -> Result<(), ureq::Error> { None => println!("{}: I have no idea", traveltext) } } + Some(_to) => println!( + "{}: {}", + traveltext, + "you're not checked in".red() + ) } } Command::Checkin { from, to, train } => { |