From 80a4af9f0a6f7e3bd2d8254f8bc8475ca73b8980 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Tue, 1 Feb 2022 17:41:56 +0100 Subject: display iceportal itinery & stops I'm pretty sure something in parsing the times is broken, since this train is currently /also/ broken I have absolutely no idea what the correct ones would be and don't have the energy to dig further into this. --- src/travelynx.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/travelynx.rs') diff --git a/src/travelynx.rs b/src/travelynx.rs index 5457641..a6c59e1 100644 --- a/src/travelynx.rs +++ b/src/travelynx.rs @@ -48,6 +48,12 @@ pub struct TrainRef { pub no: String, } +impl std::fmt::Display for TrainRef { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{} {}", self._type, self.no) + } +} + #[derive(Deserialize, Debug)] pub struct Response { success: Option, -- cgit v1.2.3