-
Notifications
You must be signed in to change notification settings - Fork 2
Rjf/investigate omf panic #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 6 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
5c3848d
omf app cli batch_size, source w/ changed bin location
robfitzgerald f39f78d
use max_by_key for latest
robfitzgerald 64414f7
omf app cli batch_size, source w/ changed bin location
robfitzgerald 777dced
"during" deserialized to OSM time with String fallback variant
robfitzgerald 15d69ad
clippy
robfitzgerald 9a2f5f5
typo
robfitzgerald a7d9b57
simple tests for deserialization
robfitzgerald 5162f6b
use max, compare with tiebreaker
robfitzgerald b26ccc0
remove deprecated
robfitzgerald 23507f1
remove deprecated
robfitzgerald 438b69b
Merge branch 'main' into rjf/investigate-omf-panic; roll back batch_s…
robfitzgerald c5b5fc5
clippy
robfitzgerald 5d856af
Merge branch 'main' into rjf/investigate-omf-panic
robfitzgerald File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
This file was deleted.
Oops, something went wrong.
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
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
28 changes: 28 additions & 0 deletions
28
rust/bambam-omf/src/collection/record/during_expression.rs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| use opening_hours_syntax::rules::OpeningHoursExpression; | ||
| use serde::{Deserialize, Serialize}; | ||
|
|
||
| #[derive(Deserialize, Serialize, Debug, Clone)] | ||
| #[serde(untagged)] | ||
| pub enum DuringExpression { | ||
| #[serde(with = "opening_hours_codec")] | ||
| Osm(OpeningHoursExpression), | ||
| Unexpected(String), | ||
| } | ||
|
|
||
| mod opening_hours_codec { | ||
| use opening_hours_syntax::rules::OpeningHoursExpression; | ||
| use serde::Deserialize; | ||
| pub fn serialize<S>(t: &OpeningHoursExpression, s: S) -> Result<S::Ok, S::Error> | ||
| where | ||
| S: serde::Serializer, | ||
| { | ||
| s.serialize_str(&t.to_string()) | ||
| } | ||
| pub fn deserialize<'de, D>(d: D) -> Result<OpeningHoursExpression, D::Error> | ||
| where | ||
| D: serde::Deserializer<'de>, | ||
| { | ||
| let s = String::deserialize(d)?; | ||
| opening_hours_syntax::parse(&s).map_err(serde::de::Error::custom) | ||
| } | ||
| } | ||
robfitzgerald marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| mod building; | ||
| mod common; | ||
| mod during_expression; | ||
| mod overture_record; | ||
| mod place; | ||
| mod record_type; | ||
|
|
||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| use bambam_omf::{app::OmfApp, collection::OvertureMapsCollectionError}; | ||
| use clap::Parser; | ||
|
|
||
| fn main() -> Result<(), OvertureMapsCollectionError> { | ||
| env_logger::init(); | ||
| let args = OmfApp::parse(); | ||
| args.op.run() | ||
| } |
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.
Uh oh!
There was an error while loading. Please reload this page.