fix field naming
This commit is contained in:
@ -51,7 +51,7 @@ async fn run() {
|
|||||||
#[derive(serde::Deserialize, Debug)]
|
#[derive(serde::Deserialize, Debug)]
|
||||||
struct Climate {
|
struct Climate {
|
||||||
humidity: f32,
|
humidity: f32,
|
||||||
temperature: f32,
|
temp: f32,
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn handler(
|
async fn handler(
|
||||||
@ -124,7 +124,7 @@ async fn handler(
|
|||||||
|
|
||||||
cx.answer_str(format!(
|
cx.answer_str(format!(
|
||||||
"Your room temperature is {:.2} and humidity is {:.2}.",
|
"Your room temperature is {:.2} and humidity is {:.2}.",
|
||||||
info.temperature, info.humidity
|
info.temp, info.humidity
|
||||||
))
|
))
|
||||||
.await?
|
.await?
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user