Skip to content

Commit

Permalink
NWS: Move wind_kmh min/max into wind comparison statements
Browse files Browse the repository at this point in the history
  • Loading branch information
Cognoscan committed Jun 21, 2024
1 parent b6f9eb2 commit db4cfb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/blocks/weather/nws.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ fn combine_forecasts(data: &[ForecastAggregate], fin: WeatherMoment) -> Forecast
if val.wind > max.wind {
max.wind_direction = val.wind_direction;
max.wind = val.wind;
max.wind_kmh = val.wind_kmh;
}
max.wind_kmh = max.wind_kmh.max(val.wind_kmh);

// Min
min.temp = min.temp.min(val.temp);
Expand All @@ -264,8 +264,8 @@ fn combine_forecasts(data: &[ForecastAggregate], fin: WeatherMoment) -> Forecast
if val.wind < min.wind {
min.wind_direction = val.wind_direction;
min.wind = val.wind;
min.wind_kmh = val.wind_kmh;
}
min.wind_kmh = min.wind_kmh.min(val.wind_kmh);
}

let count = data.len() as f64;
Expand Down

0 comments on commit db4cfb5

Please sign in to comment.