Skip to content

Commit 8efc975

Browse files
author
Ruslan
committed
Make numbers easier to read
1 parent 7aebb0b commit 8efc975

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/weather.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ pub async fn set_weather(api: Api<'_>) {
111111
let offset_hours = format!("+{offset_sec}:00");
112112

113113
api.set_weather_current(WeatherCurrent {
114-
temperature: api_data.current.temperature_2m,
115-
precipitation: api_data.current.precipitation,
114+
temperature: api_data.current.temperature_2m as i32,
115+
precipitation: api_data.current.precipitation as i32,
116116
weather_type: code_to_type(api_data.current.weather_code),
117117
});
118118

ui/api.slint

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ export struct WeatherDaily {
3636
}
3737

3838
export struct WeatherCurrent {
39-
temperature: float,
40-
precipitation: float,
39+
temperature: int,
40+
precipitation: int,
4141
weather_type: WeatherType,
4242
}
4343

0 commit comments

Comments
 (0)