From 7e700e362ac3b7f034bfcbcabdc6a14add74e154 Mon Sep 17 00:00:00 2001 From: Aleksandr Trushkin Date: Sun, 15 Nov 2020 21:50:54 +0300 Subject: [PATCH] fix field naming --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 488dc14..a43fc02 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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? }