diff options
| -rw-r--r-- | Cargo.lock | 2 | ||||
| -rw-r--r-- | Cargo.toml | 3 | ||||
| -rw-r--r-- | src/eorzean_weather.rs | 2 |
3 files changed, 4 insertions, 3 deletions
@@ -66,7 +66,7 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "ffxiv-chronowatcher" -version = "0.0.3" +version = "0.0.32" dependencies = [ "chrono", "serde", @@ -4,11 +4,12 @@ description = "Weather and Eorzean Time Library for Final Fantasy XIV" repository = "https://github.com/pinapelz/ffxiv-chronowatcher" readme = "README.md" keywords = ["ffxiv", "eorzea", "weather", "time"] -version = "0.0.3" +version = "0.0.32" edition = "2021" exclude = [ "src/main.rs", ] + license = "MIT" [dependencies] diff --git a/src/eorzean_weather.rs b/src/eorzean_weather.rs index 3badd0f..a462627 100644 --- a/src/eorzean_weather.rs +++ b/src/eorzean_weather.rs @@ -175,7 +175,7 @@ pub fn calculate_weather_forecast_target<T: ToUnixTimestamp>(current_time: T) -> /// - A Weather struct representing the current weather pub fn get_weather_by_time<T: ToUnixTimestamp>(zone_name: &str, current_time: T) -> Weather { // Load the weather data from the JSON file - let weather_data = fs::read_to_string("data/weather_data.json").expect("Unable to read the weather data file"); + let weather_data = include_str!("../data/weather_data.json"); let weather_data: serde_json::Value = serde_json::from_str(&weather_data).expect("Unable to parse the weather data"); let zone_data = weather_data .get(zone_name) |
