12 lines
347 B
Rust
12 lines
347 B
Rust
use anyhow::Result;
|
|
|
|
use departure::{format_departures, get_departures_for_station, get_station_name_from_args};
|
|
|
|
fn main() -> Result<()> {
|
|
let station_name = get_station_name_from_args()?;
|
|
let response = get_departures_for_station(station_name)?;
|
|
let formatted = format_departures(response);
|
|
println!("{formatted}");
|
|
Ok(())
|
|
}
|