Skip to content

Commit

Permalink
fix(weather): typo and invalid enum (#87)
Browse files Browse the repository at this point in the history
🤦

Resolves: #86
  • Loading branch information
johnallen3d authored Sep 6, 2023
1 parent fc88529 commit db1560a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/weather/weather_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use thiserror::Error;
use super::{CurrentConditions, WeatherProvider};
use crate::icons::TimeOfDay;

static URL: &str = "http://api.weatherapi.com/v1/current.jso";
static URL: &str = "http://api.weatherapi.com/v1/current.json";

pub struct Client {
key: String,
Expand Down Expand Up @@ -84,8 +84,10 @@ struct WeatherAPIResultCondition {

impl From<WeatherAPIResult> for CurrentConditions {
fn from(result: WeatherAPIResult) -> Self {
let icon = TimeOfDay::from(result.current.is_day)
.icon(super::Provider::OpenMeteo, result.current.condition.code);
let icon = TimeOfDay::from(result.current.is_day).icon(
super::Provider::WeatherAPI("".to_string()),
result.current.condition.code,
);

Self {
temp_c: result.current.temp_c,
Expand Down

0 comments on commit db1560a

Please sign in to comment.