diff options
Diffstat (limited to 'src/types.rs')
-rw-r--r-- | src/types.rs | 10 |
1 files changed, 5 insertions, 5 deletions
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<String>, 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 } } |