Skip to content

Commit

Permalink
decode correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
kylerchin committed Oct 28, 2024
1 parent bbf0ff4 commit bf38e03
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 44 deletions.
4 changes: 1 addition & 3 deletions src/birch/get_vehicle_trip_information.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,7 @@ pub async fn get_trip_rt_update(
let find_trip = get_trip.iter().find(|each_update| {
matches!(
each_update.trip.start_time.as_ref().map(
|start_time| {
start_time == query_start_time
}
|start_time| { start_time == query_start_time }
),
Some(true)
)
Expand Down
13 changes: 4 additions & 9 deletions src/birch/nearby_departures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -678,18 +678,13 @@ pub async fn nearby_from_coords(
)
.await;



if let Ok(etcd_data) = etcd_data {
if let Some(first_value) = etcd_data.kvs().first() {
let this_chateau_metadata = bincode::deserialize::<ChateauMetadataEtcd>(
first_value.value(),
)
.unwrap();
}
let this_chateau_metadata =
bincode::deserialize::<ChateauMetadataEtcd>(first_value.value()).unwrap();

chateau_metadata.insert(chateau_id.clone(), this_chateau_metadata);

chateau_metadata.insert(chateau_id.clone(), this_chateau_metadata);
}
}
}

Expand Down
8 changes: 3 additions & 5 deletions src/maple/gtfs_handlers/colour_correction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@ pub fn fix_background_colour_rgb_feed_route(

_ => fix_background_colour_rgb(background),
},
"f-ez-renfeoperadora" => {
match route.short_name.as_deref() {
Some("AVE") => RGB::new(214, 5, 95),
_ => RGB::new(184, 183, 189)
}
"f-ez-renfeoperadora" => match route.short_name.as_deref() {
Some("AVE") => RGB::new(214, 5, 95),
_ => RGB::new(184, 183, 189),
},
"f-9q5b-longbeachtransit" => {
match route.id.as_str() {
Expand Down
4 changes: 2 additions & 2 deletions src/maple/transitland_download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,11 +389,11 @@ fn add_auth_headers(request: RequestBuilder, feed_id: &str) -> RequestBuilder {
"api_key",
"3be3d48087754c4998e6b33b65ec9700".parse().unwrap(),
);
},
}
"f-rb6b-metrochristchurch" => {
headers.insert(
"Ocp-Apim-Subscription-Key",
"286e6dff5afe4565a08f3d453f8d28e2".parse().unwrap()
"286e6dff5afe4565a08f3d453f8d28e2".parse().unwrap(),
);
}
_ => {}
Expand Down
49 changes: 24 additions & 25 deletions src/osm_extractor/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,31 +41,30 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
let file_list = [
"north-america/canada/quebec",
"europe/france/alsace",
"europe/france/aquitaine",
"europe/france/auvergne",
"europe/france/basse-normandie",
"europe/france/bourgogne",
"europe/france/bretagne",
"europe/france/centre",
"europe/france/champagne-ardenne",
"europe/france/corse",
"europe/france/franche-comte",
"europe/france/haute-normandie",
"europe/france/ile-de-france",
"europe/france/languedoc-roussillon",
"europe/france/limousin",
"europe/france/lorraine",
"europe/france/midi-pyrenees",
"europe/france/nord-pas-de-calais",
"europe/france/pays-de-la-loire",
"europe/france/picardie",
"europe/france/poitou-charentes",
"europe/france/provence-alpes-cote-d-azur",
"europe/france/rhone-alpes",
"europe/switzerland",
"europe/germany",
"europe/austria"
//"north-america/canada/new-brunswick"
"europe/france/aquitaine",
"europe/france/auvergne",
"europe/france/basse-normandie",
"europe/france/bourgogne",
"europe/france/bretagne",
"europe/france/centre",
"europe/france/champagne-ardenne",
"europe/france/corse",
"europe/france/franche-comte",
"europe/france/haute-normandie",
"europe/france/ile-de-france",
"europe/france/languedoc-roussillon",
"europe/france/limousin",
"europe/france/lorraine",
"europe/france/midi-pyrenees",
"europe/france/nord-pas-de-calais",
"europe/france/pays-de-la-loire",
"europe/france/picardie",
"europe/france/poitou-charentes",
"europe/france/provence-alpes-cote-d-azur",
"europe/france/rhone-alpes",
"europe/switzerland",
"europe/germany",
"europe/austria", //"north-america/canada/new-brunswick"
];

for file_name in file_list {
Expand Down

0 comments on commit bf38e03

Please sign in to comment.