Skip to content

Commit

Permalink
Merge pull request #963 from hove-io/fix/DHUB-1048-gtfs-booking-misprint
Browse files Browse the repository at this point in the history
Fix misprint in gtfs booking_rules.txt
  • Loading branch information
ArnaudOggy authored Feb 4, 2025
2 parents 90985fb + b390545 commit c6bd805
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
authors = ["Hove <[email protected]>", "Guillaume Pinot <[email protected]>"]
name = "transit_model"
version = "0.68.0"
version = "0.68.1"
license = "AGPL-3.0-only"
description = "Transit data management"
repository = "https://github.com/hove-io/transit_model"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
id,booking_type,message,phone_number,info_url,booking_url
booking_rule_id,booking_type,message,phone_number,info_url,booking_url
MFDI:10,0,"Bus de soirée : Le service fonctionne sans réservation, il suffit d'indiquer l'arrêt de descente au conducteur",,,
MFDI:11,0,24h/24 et 7j/7,01 74 37 24 77,https://www.fileo.com/se-deplacer/reserver-votre-fileo/,https://www.fileo.com/tad
MFDI:12,0,,,,
2 changes: 1 addition & 1 deletion src/file_handler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl<P: AsRef<Path>> PathFileHandler<P> {
}
}

impl<'a, P: AsRef<Path>> FileHandler for &'a mut PathFileHandler<P> {
impl<P: AsRef<Path>> FileHandler for &mut PathFileHandler<P> {
type Reader = File;
fn get_file_if_exists(self, name: &str) -> Result<(Option<Self::Reader>, PathBuf)> {
let f = self.base_path.as_ref().join(name);
Expand Down
7 changes: 4 additions & 3 deletions src/gtfs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ struct Agency {
ticketing_deep_link_id: Option<String>,
}

impl<'a> From<&'a objects::Network> for Agency {
impl From<&objects::Network> for Agency {
fn from(obj: &objects::Network) -> Agency {
Agency {
id: Some(obj.id.clone()),
Expand Down Expand Up @@ -239,6 +239,7 @@ enum BookingType {
#[derive(Derivative, Serialize)]
#[derivative(Default)]
struct BookingRule {
#[serde(rename = "booking_rule_id")]
id: String,
booking_type: BookingType,
message: Option<String>,
Expand All @@ -247,7 +248,7 @@ struct BookingRule {
booking_url: Option<String>,
}

impl<'a> From<&'a objects::BookingRule> for BookingRule {
impl From<&objects::BookingRule> for BookingRule {
fn from(obj: &objects::BookingRule) -> BookingRule {
BookingRule {
id: obj.id.clone(),
Expand Down Expand Up @@ -285,7 +286,7 @@ struct Transfer {
min_transfer_time: Option<u32>,
}

impl<'a> From<&'a objects::Transfer> for Transfer {
impl From<&objects::Transfer> for Transfer {
fn from(obj: &objects::Transfer) -> Transfer {
Transfer {
from_stop_id: obj.from_stop_id.clone(),
Expand Down
2 changes: 1 addition & 1 deletion src/gtfs/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ where
.collect()
}

impl<'a> From<&'a objects::PhysicalMode> for RouteType {
impl From<&objects::PhysicalMode> for RouteType {
fn from(obj: &objects::PhysicalMode) -> RouteType {
match obj.id.as_str() {
"RailShuttle" | "Tramway" => RouteType::Tramway,
Expand Down
4 changes: 2 additions & 2 deletions src/model_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ impl AsDateTime for &NaiveDateTime {
}
}

impl<'a> VehicleJourneyBuilder<'a> {
impl VehicleJourneyBuilder<'_> {
fn find_or_create_sp(&mut self, sp: &str) -> Idx<StopPoint> {
self.model
.collections
Expand Down Expand Up @@ -1039,7 +1039,7 @@ impl<'a> VehicleJourneyBuilder<'a> {
}
}

impl<'a> Drop for VehicleJourneyBuilder<'a> {
impl Drop for VehicleJourneyBuilder<'_> {
fn drop(&mut self) {
use std::ops::DerefMut;
let collections = &mut self.model.collections;
Expand Down
2 changes: 1 addition & 1 deletion src/objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ impl<'de> ::serde::Deserialize<'de> for Time {

// using the visitor pattern to avoid a string allocation
struct TimeVisitor;
impl<'de> Visitor<'de> for TimeVisitor {
impl Visitor<'_> for TimeVisitor {
type Value = Time;
fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
formatter.write_str("a time in the format HH:MM:SS")
Expand Down

0 comments on commit c6bd805

Please sign in to comment.