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