Skip to content

Commit

Permalink
Merge pull request #828 from CanalTP/comment-warn
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean SIMARD authored Nov 15, 2021
2 parents d273fd4 + 736a55f commit 7034601
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 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 = ["Kisio Digital <[email protected]>", "Guillaume Pinot <[email protected]>"]
name = "transit_model"
version = "0.42.0"
version = "0.42.1"
license = "AGPL-3.0-only"
description = "Transit data management"
repository = "https://github.com/CanalTP/transit_model"
Expand Down
30 changes: 17 additions & 13 deletions src/ntfs/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -490,40 +490,44 @@ where
.iter()
.map(|(k, v)| (v, k.clone()))
.collect();
// info!("Reading comment_links.txt");
info!("Reading comment_links.txt");
for comment_link in comment_links {
match comment_link.object_type {
ObjectType::StopArea => insert_comment_link(
ObjectType::StopArea => skip_error_and_warn!(insert_comment_link(
&mut collections.stop_areas,
&collections.comments,
&comment_link,
)?,
ObjectType::StopPoint => insert_comment_link(
)),
ObjectType::StopPoint => skip_error_and_warn!(insert_comment_link(
&mut collections.stop_points,
&collections.comments,
&comment_link,
)?,
)),
ObjectType::Line => {
insert_comment_link(&mut collections.lines, &collections.comments, &comment_link)?
skip_error_and_warn!(insert_comment_link(
&mut collections.lines,
&collections.comments,
&comment_link
))
}
ObjectType::Route => insert_comment_link(
ObjectType::Route => skip_error_and_warn!(insert_comment_link(
&mut collections.routes,
&collections.comments,
&comment_link,
)?,
ObjectType::VehicleJourney => insert_comment_link(
)),
ObjectType::VehicleJourney => skip_error_and_warn!(insert_comment_link(
&mut collections.vehicle_journeys,
&collections.comments,
&comment_link,
)?,
ObjectType::StopTime => insert_stop_time_comment_link(
)),
ObjectType::StopTime => skip_error_and_warn!(insert_stop_time_comment_link(
&mut collections.stop_time_comments,
&stop_time_ids,
&collections.comments,
&comment_link,
)?,
)),
ObjectType::LineGroup => warn!("line_groups.txt is not parsed yet"),
_ => bail!(
_ => warn!(
"comment does not support {}",
comment_link.object_type.as_str()
),
Expand Down

0 comments on commit 7034601

Please sign in to comment.