From ac0b725a3f8873af4b17a4482a9fe4a4d8a7f6e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristram=20Gr=C3=A4bener?= Date: Fri, 20 Mar 2026 14:19:37 +0100 Subject: [PATCH 1/3] switch to rust 2024 edition --- Cargo.toml | 2 +- src/enums.rs | 6 +++--- src/gtfs.rs | 2 +- src/raw_gtfs.rs | 2 +- src/tests.rs | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 267ddf1..40958a3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ authors = [ ] repository = "https://github.com/rust-transit/gtfs-structure" license = "MIT" -edition = "2018" +edition = "2024" [features] default = ["read-url"] diff --git a/src/enums.rs b/src/enums.rs index 516e514..ae869dc 100644 --- a/src/enums.rs +++ b/src/enums.rs @@ -467,7 +467,7 @@ impl<'de> Deserialize<'de> for ExactTimes { &_ => { return Err(serde::de::Error::custom(format!( "Invalid value `{s}`, expected 0 or 1" - ))) + ))); } }) } @@ -562,7 +562,7 @@ impl<'de> Deserialize<'de> for TransferType { s => { return Err(serde::de::Error::custom(format!( "Invalid value `{s}`, expected 0, 1, 2, 3, 4, 5" - ))) + ))); } }) } @@ -652,7 +652,7 @@ impl<'de> Deserialize<'de> for DefaultFareCategory { &_ => { return Err(serde::de::Error::custom(format!( "Invalid value `{s}`, expected 0 or 1" - ))) + ))); } }) } diff --git a/src/gtfs.rs b/src/gtfs.rs index 9d7f608..cf2a812 100644 --- a/src/gtfs.rs +++ b/src/gtfs.rs @@ -1,4 +1,4 @@ -use crate::{objects::*, Error, RawGtfs}; +use crate::{Error, RawGtfs, objects::*}; use chrono::prelude::NaiveDate; use std::collections::{HashMap, HashSet}; use std::convert::TryFrom; diff --git a/src/raw_gtfs.rs b/src/raw_gtfs.rs index f6e53d9..04a411b 100644 --- a/src/raw_gtfs.rs +++ b/src/raw_gtfs.rs @@ -1,6 +1,6 @@ -use crate::objects::*; use crate::Error; use crate::GtfsReader; +use crate::objects::*; use std::path::Path; use web_time::Duration; diff --git a/src/tests.rs b/src/tests.rs index fee2717..bfeecab 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -1,8 +1,8 @@ use std::collections::HashMap; -use crate::objects::*; use crate::Gtfs; use crate::RawGtfs; +use crate::objects::*; use chrono::NaiveDate; use rgb::RGB8; From e1fbcc6e2ae57ef33c81946eff6c04de1c77ccc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristram=20Gr=C3=A4bener?= Date: Fri, 20 Mar 2026 14:21:25 +0100 Subject: [PATCH 2/3] fix github actions --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2873df9..bcbb750 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,7 +17,7 @@ jobs: ~/.cargo/git/db/ target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} - - run: test --all-features + - run: cargo test --all-features - run: cargo test --no-default-features lints: From bc126b4464d40961a248d1f53ab6130dd5488b3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristram=20Gr=C3=A4bener?= Date: Fri, 20 Mar 2026 14:27:05 +0100 Subject: [PATCH 3/3] fix typo --- src/gtfs_reader.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gtfs_reader.rs b/src/gtfs_reader.rs index 39e556f..f9e609d 100644 --- a/src/gtfs_reader.rs +++ b/src/gtfs_reader.rs @@ -81,7 +81,7 @@ impl GtfsReader { /// Should the fields be trimmed (default: true) /// - /// It is quite time consumming + /// It is quite time consuming /// If performance is an issue, and if your data is high quality, you can set it to false pub fn trim_fields(mut self, trim_fields: bool) -> Self { self.trim_fields = trim_fields;