From 0a3aad3a4e31049b36832827a5b3afff1334bff8 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Mon, 9 Sep 2024 15:47:47 +0200 Subject: do not require ds100 codes in API responses these are not present when other hafas backends than the DB one were used for the trip's checkin. --- src/types.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/types.rs') diff --git a/src/types.rs b/src/types.rs index 257f857..b698898 100644 --- a/src/types.rs +++ b/src/types.rs @@ -10,7 +10,7 @@ use crate::traits::IsStation; #[serde(rename_all = "camelCase")] pub struct Station { name: String, - pub ds100: String, + pub ds100: Option, uic: u64, latitude: f64, longitude: f64, @@ -56,8 +56,8 @@ impl IsStation for Station { Some(&self.real_time) } - fn ds100(&self) -> &str { - &self.ds100 + fn ds100(&self) -> Option<&str> { + self.ds100.as_deref() } } @@ -72,8 +72,8 @@ impl IsStation for Stop { self.real_arrival.as_ref() } - fn ds100(&self) -> &str { - "[??]" + fn ds100(&self) -> Option<&str> { + None } } -- cgit v1.2.3