From 54ff9bf5665464803bbecc16b58a9dde33b22762 Mon Sep 17 00:00:00 2001 From: Dustin Carlino Date: Fri, 3 Dec 2021 05:45:56 +0000 Subject: [PATCH] Update to rust 1.57. Fix unused warnings in Soundcast importing code --- .github/workflows/main.yml | 2 +- importer/src/soundcast/popdat.rs | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5e4fbc59f1..94f6c79f28 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,7 +25,7 @@ jobs: - uses: hecrj/setup-rust-action@v1 with: - rust-version: 1.56.0 + rust-version: 1.57.0 - name: Cache build uses: actions/cache@v2 diff --git a/importer/src/soundcast/popdat.rs b/importer/src/soundcast/popdat.rs index 32bc56e900..9335bdd994 100644 --- a/importer/src/soundcast/popdat.rs +++ b/importer/src/soundcast/popdat.rs @@ -233,7 +233,7 @@ fn import_parcels( panic!("Can't import_parcels for popdat.bin without the scenarios feature (GDAL dependency)"); } -// From https://github.com/psrc/soundcast/wiki/Outputs#trip-file-_triptsv, opurp and dpurp +// From https://github.com/psrc/soundcast/wiki/Outputs#trip-file-_triptsv, dpurp fn get_purpose(code: &str) -> TripPurpose { match code { "0.0" => TripPurpose::Home, @@ -247,7 +247,7 @@ fn get_purpose(code: &str) -> TripPurpose { "8.0" => TripPurpose::Recreation, "9.0" => TripPurpose::Medical, "10.0" => TripPurpose::ParkAndRideTransfer, - _ => panic!("Unknown opurp/dpurp {}", code), + _ => panic!("Unknown dpurp {}", code), } } @@ -287,7 +287,6 @@ struct RawTrip { dpcl: f64, deptm: f64, mode: String, - opurp: String, dpurp: String, travtime: f64, travdist: f64, @@ -300,6 +299,8 @@ struct RawTrip { // See https://github.com/psrc/soundcast/wiki/Outputs#buffered-parcel-file-buffered_parcelsdat #[derive(Debug, Deserialize)] +// When the 'scenarios' feature is disabled, these fields look unused +#[allow(unused)] struct RawParcel { parcelid: usize, hh_p: usize,