diff --git a/rustclock/src/main.rs b/rustclock/src/main.rs index 1373516..7be9ad1 100644 --- a/rustclock/src/main.rs +++ b/rustclock/src/main.rs @@ -84,7 +84,9 @@ impl RustClock { self.current_time = Local::now(); Task::none() } - Message::RunWeatherUpdate => Task::perform(weather::get_weather(), Message::UpdateWeatherImg), + Message::RunWeatherUpdate => { + Task::perform(weather::get_weather(), Message::UpdateWeatherImg) + } Message::UpdateWeatherImg(handle) => { self.weather_handle = Some(handle); Task::none() diff --git a/rustclock/src/sports.rs b/rustclock/src/sports.rs index 1af6055..b2f42ad 100644 --- a/rustclock/src/sports.rs +++ b/rustclock/src/sports.rs @@ -86,11 +86,11 @@ pub fn update_mlb() -> Vec { ); mlb_game_struct.update(&home_score, &away_score, period); mlb_games_vec.push(mlb_game_struct); - dbg!("Home Team: {}", home_team); - dbg!("Away Team: {}", away_team); - dbg!("Home Score: {}", home_score); - dbg!("Away Score: {}", away_score); - dbg!("Period: {}", period); + dbg!(home_team); + dbg!(away_team); + dbg!(home_score); + dbg!(away_score); + dbg!(period); } mlb_games_vec @@ -128,12 +128,12 @@ pub fn update_nba() -> Vec { ); game.update(&home_score, &away_score, period); updated_games.push(game); - dbg!("Game ID: {}", game_id); - dbg!("Home Team: {}", home_team); - dbg!("Away Team: {}", away_team); - dbg!("Home Score: {}", home_score); - dbg!("Away Score: {}", away_score); - dbg!("Period: {}", period); + dbg!(game_id); + dbg!(home_team); + dbg!(away_team); + dbg!(home_score); + dbg!(away_score); + dbg!(period); } updated_games } @@ -179,11 +179,11 @@ pub fn get_nba_logos() -> HashMap> { .header("User-Agent", "deathclock-app/0.1") .call() .unwrap(); - dbg!("Response {}", response.status()); + dbg!(chrono::Local::now(), response.status()); let image_data = response.into_body().read_to_vec().unwrap(); nba_svg_map.insert(team_name.to_string(), image_data); - dbg!("Downloaded logo for {}", team_name); + dbg!("Downloaded logo for ", team_name); } nba_svg_map } diff --git a/rustclock/src/weather.rs b/rustclock/src/weather.rs index c9098bb..6ee10bd 100644 --- a/rustclock/src/weather.rs +++ b/rustclock/src/weather.rs @@ -12,7 +12,7 @@ pub async fn get_weather() -> Handle { let handle = Some(Handle::from_bytes(image)); let handle = handle.unwrap(); //TODO better error handling - dbg!("updating weather"); + dbg!(format!("{}: updating weather", chrono::Local::now())); handle }