Code formatting
- Readability - `clippy`
This commit is contained in:
parent
4d9a7c0527
commit
32a94af1ee
@ -9,24 +9,31 @@ pub struct Main {
|
||||
/// Temperature in requested units (Kelvin, Celsius, or Fahrenheit)
|
||||
#[serde(default)]
|
||||
pub temp: Option<f32>,
|
||||
|
||||
/// "Feels like" temperature, accounting for human perception of weather
|
||||
#[serde(default)]
|
||||
pub feels_like: Option<f32>,
|
||||
|
||||
/// Minimum observed temperature (within large urban areas)
|
||||
#[serde(default)]
|
||||
pub temp_min: Option<f32>,
|
||||
|
||||
/// Maximum observed temperature (within large urban areas)
|
||||
#[serde(default)]
|
||||
pub temp_max: Option<f32>,
|
||||
|
||||
/// Atmospheric pressure at sea level (hPa)
|
||||
#[serde(default)]
|
||||
pub pressure: Option<u32>,
|
||||
|
||||
/// Humidity percentage (0-100)
|
||||
#[serde(default)]
|
||||
pub humidity: Option<u8>,
|
||||
|
||||
/// Atmospheric pressure at sea level (hPa)
|
||||
#[serde(default)]
|
||||
pub sea_level: Option<u32>,
|
||||
|
||||
/// Atmospheric pressure at ground level (hPa)
|
||||
#[serde(default)]
|
||||
pub grnd_level: Option<u32>,
|
||||
|
@ -20,4 +20,4 @@
|
||||
pub mod coord;
|
||||
pub mod main;
|
||||
pub mod weather;
|
||||
pub mod wind;
|
||||
pub mod wind;
|
||||
|
@ -15,7 +15,7 @@ pub struct Wind {
|
||||
/// - 270°: West
|
||||
#[serde(default)]
|
||||
pub deg: Option<u16>,
|
||||
|
||||
|
||||
/// Wind gust speed in chosen units
|
||||
#[serde(default)]
|
||||
pub gust: Option<f32>,
|
||||
@ -44,4 +44,4 @@ impl Wind {
|
||||
let index = (((u32::from(deg) * 16 + 11) / 22) % 16) as usize;
|
||||
Some(directions[index])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user