diff options
author | stuebinm | 2022-02-01 17:41:56 +0100 |
---|---|---|
committer | stuebinm | 2022-02-01 17:42:59 +0100 |
commit | 80a4af9f0a6f7e3bd2d8254f8bc8475ca73b8980 (patch) | |
tree | a2077ce6d328f2b94d0394fa1590c0cc5feac6fe /src/travelynx.rs | |
parent | aacb2d78a4a97e3e8d7fdff4c06cba8be5f3139f (diff) |
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.
Diffstat (limited to 'src/travelynx.rs')
-rw-r--r-- | src/travelynx.rs | 6 |
1 files changed, 6 insertions, 0 deletions
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<bool>, |