Update to rust 1.57.

Fix unused warnings in Soundcast importing code
This commit is contained in:
Dustin Carlino 2021-12-03 05:45:56 +00:00
parent d567366ee2
commit 54ff9bf566
2 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -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,