Skip to content

Commit

Permalink
🚨 satisfy clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Oct 16, 2024
1 parent 2eb16a7 commit 5001214
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/modules/display/historical.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ pub fn prep(product: &Product, params: &Params, date: NaiveDate) -> Result<Vec<S
));

// Hourly Overview
for line in hourly::prep_historical(weather, &params)? {
for line in hourly::prep_historical(weather, params)? {
result.push(line);
}

Expand Down
7 changes: 3 additions & 4 deletions src/modules/display/hourly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,10 @@ pub fn prep_historical(weather: &OptionalWeather, params: &Params) -> Result<Vec
Temperature::celsius => "",
};
let precipitation_unit = match units.precipitation {
Precipitation::mm => "ₘₘ",
Precipitation::inch => "ᵢₙ",
// In case the `probability` unit is configured while making a historical request,
// "mm" is set for precipitation (ref. weather.rs). Adjust the displayed unit accordingly.
Precipitation::probability => "ₘₘ",
// “mm” is set for precipitation (see weather.rs).
Precipitation::probability | Precipitation::mm => "ₘₘ",
Precipitation::inch => "ᵢₙ",
};

// Hourly Forecast Heading
Expand Down

0 comments on commit 5001214

Please sign in to comment.