From 5ec90794568339c1f15183c78f32613602c7c187 Mon Sep 17 00:00:00 2001 From: Xiretza Date: Fri, 2 Feb 2024 15:27:17 +0000 Subject: [PATCH] Avoid unnecessary item paths --- src/fronious.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/fronious.rs b/src/fronious.rs index 4451b03..bdccd6d 100644 --- a/src/fronious.rs +++ b/src/fronious.rs @@ -1,6 +1,6 @@ use serde::{de::DeserializeOwned, Deserialize, Serialize}; use serde_repr::{Deserialize_repr, Serialize_repr}; -use std::net::IpAddr; +use std::{collections::HashMap, net::IpAddr}; use thiserror::Error; #[derive(Debug, Error)] @@ -54,7 +54,7 @@ pub struct Status { #[derive(Debug, Serialize, Deserialize)] #[serde(rename_all = "PascalCase")] pub struct CommonResponseHeader { - request_arguments: std::collections::HashMap, + request_arguments: HashMap, status: Status, #[serde(with = "time::serde::rfc3339")] timestamp: time::OffsetDateTime, @@ -77,7 +77,7 @@ pub struct CommonResponseBody { #[serde(rename_all = "PascalCase")] pub struct UnitAndValues { unit: String, - values: std::collections::HashMap, + values: HashMap, } #[derive(Debug, Serialize, Deserialize)] @@ -133,7 +133,7 @@ pub struct CumulationInverterData { year_energy: UnitAndValue, total_energy: UnitAndValue, #[serde(rename = "DeviceStatus")] - device_status: Option>, + device_status: Option>, } impl DataCollection for CumulationInverterData {