diff --git a/Cargo.toml b/Cargo.toml index 7bb9f62..648010c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "amtrak-gtfs-rt" -version = "0.2.0" +version = "0.2.1" license = "AGPL-3.0" description = "Converts Amtrak Track-A-Train to valid GTFS-rt vehicle and trip information" edition = "2021" diff --git a/src/lib.rs b/src/lib.rs index 7036d82..10c2af6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -505,11 +505,11 @@ pub async fn fetch_amtrak_gtfs_rt_joined( Ok(raw_data) => { //println!("Raw data successfully downloaded"); - let decrypted_string = amtk::decrypt(raw_data.text().await.unwrap().as_str()).unwrap(); + let decrypted_string = amtk::decrypt(raw_data.text().await.unwrap().as_str())?; - let geojson: geojson::GeoJson = decrypted_string.parse::().unwrap(); + let geojson: geojson::GeoJson = decrypted_string.parse::()?; let features_collection: FeatureCollection = - FeatureCollection::try_from(geojson).unwrap(); + FeatureCollection::try_from(geojson)?; //println!("Successfully decrypted"); //println!("{}", decrypted_string);