summaryrefslogtreecommitdiff
path: root/src/travelynx.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/travelynx.rs')
-rw-r--r--src/travelynx.rs6
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>,