Skip to content

V0.1.4 - #5

Open
vincbro wants to merge 4 commits into
mainfrom
v0.1.4
Open

V0.1.4#5
vincbro wants to merge 4 commits into
mainfrom
v0.1.4

Conversation

@vincbro

@vincbro vincbro commented May 17, 2026

Copy link
Copy Markdown
Owner

This pull request refactors and improves the GTFS binary compiler by simplifying function signatures, improving type safety, and introducing new structures for stop searching. The main changes include removing unnecessary error handling in builder functions, switching to more idiomatic Rust patterns, and adding new fields and logic to support stop search functionality.

Refactoring and Simplification

  • Removed unnecessary Result returns and error handling in builder functions such as build_stops, build_routes, build_services, and related functions, making their signatures cleaner and assuming valid GTFS input. [1] [2] [3] [4] [5]
  • Replaced manual integer casting with from constructors for index types (e.g., StopIdx::from(i)), improving type safety and readability. [1] [2] [3] [4]

Improved Data Modeling

  • Updated the construction of Stop, Route, and Service structs to use new or refactored constructors (Stop::new, Route::new, Service::new) and to better encapsulate their fields. [1] [2] [3]
  • Changed calendar service weekday handling to use a new Weekday bitmask type instead of the previous WeekdaySet, simplifying logic and improving efficiency.

Stop Search Feature

  • Introduced new stop search structures and logic: added build_stop_search and updated the compiler to generate and write search_stops and search_to_stops sections, supporting efficient stop searching. [1] [2] [3]

API and Dependency Updates

  • Made several builder functions public (pub fn) to allow broader usage and better modularity. [1] [2] [3] [4] [5]
  • Added the spinners crate as a dependency in Cargo.toml for improved CLI feedback.

Miscellaneous

  • Updated the crate version from 0.1.3 to 0.1.4 in Cargo.toml.

These changes collectively modernize the codebase, improve maintainability, and add new features for stop searching.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant