Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Resultreturns and error handling in builder functions such asbuild_stops,build_routes,build_services, and related functions, making their signatures cleaner and assuming valid GTFS input. [1] [2] [3] [4] [5]fromconstructors for index types (e.g.,StopIdx::from(i)), improving type safety and readability. [1] [2] [3] [4]Improved Data Modeling
Stop,Route, andServicestructs to use new or refactored constructors (Stop::new,Route::new,Service::new) and to better encapsulate their fields. [1] [2] [3]Weekdaybitmask type instead of the previousWeekdaySet, simplifying logic and improving efficiency.Stop Search Feature
build_stop_searchand updated the compiler to generate and writesearch_stopsandsearch_to_stopssections, supporting efficient stop searching. [1] [2] [3]API and Dependency Updates
pub fn) to allow broader usage and better modularity. [1] [2] [3] [4] [5]spinnerscrate as a dependency inCargo.tomlfor improved CLI feedback.Miscellaneous
0.1.3to0.1.4inCargo.toml.These changes collectively modernize the codebase, improve maintainability, and add new features for stop searching.