diff --git a/src/core/energy_supply/energy_supply.rs b/src/core/energy_supply/energy_supply.rs index 03a4dcb..25fd4d0 100644 --- a/src/core/energy_supply/energy_supply.rs +++ b/src/core/energy_supply/energy_supply.rs @@ -1,8 +1,7 @@ use crate::input::{ElectricBattery, EnergyDiverter, EnergySupplyType}; -use crate::simulation_time::{SimulationTimeIterator}; +use crate::simulation_time::SimulationTimeIterator; use std::collections::HashMap; - pub struct EnergySupply { fuel_type: EnergySupplyType, simulation_time: SimulationTimeIterator, @@ -205,12 +204,12 @@ mod test { simulation_time: SimulationTimeIterator, ) { for simtime in simulation_time { - energy_supply.demand_energy( + let _ = energy_supply.demand_energy( "shower".to_string(), (simtime.index as f64 + 1.0) * 50.0, simtime.index, ); - energy_supply.demand_energy( + let _ = energy_supply.demand_energy( "bath".to_string(), simtime.index as f64 * 20.0, simtime.index, diff --git a/src/core/space_heat_demand/ventilation_element.rs b/src/core/space_heat_demand/ventilation_element.rs index 8fc59f9..68d06a6 100644 --- a/src/core/space_heat_demand/ventilation_element.rs +++ b/src/core/space_heat_demand/ventilation_element.rs @@ -10,8 +10,7 @@ use crate::core::units::{ }; use crate::external_conditions::ExternalConditions; use crate::input::{ - BuildingElement, InfiltrationBuildType, InfiltrationShelterType, - InfiltrationTestType, + BuildingElement, InfiltrationBuildType, InfiltrationShelterType, InfiltrationTestType, }; use crate::simulation_time::SimulationTimeIterator; use std::collections::HashSet; @@ -337,7 +336,7 @@ impl MechanicalVentilationHeatRecovery { let fan_energy_use_kwh = (fan_power_w / WATTS_PER_KILOWATT as f64) * self.simulation_time.step_in_hours(); - self.energy_supply.demand_energy( + let _ = self.energy_supply.demand_energy( self.energy_supply_end_user_name.clone(), fan_energy_use_kwh, timestep_index, diff --git a/src/external_conditions.rs b/src/external_conditions.rs index 7a28098..ff99619 100644 --- a/src/external_conditions.rs +++ b/src/external_conditions.rs @@ -1,3 +1,5 @@ +#![allow(non_snake_case)] + use crate::simulation_time::{SimulationTimeIterator, HOURS_IN_DAY}; use itertools::Itertools; use serde::Deserialize; diff --git a/src/input.rs b/src/input.rs index ecfc0bb..c58f56e 100644 --- a/src/input.rs +++ b/src/input.rs @@ -2,7 +2,7 @@ use crate::external_conditions::{DaylightSavingsConfig, ShadingSegment, WindowSh use crate::simulation_time::SimulationTime; use indexmap::IndexMap; use serde::Deserialize; -use serde_json::{Value}; +use serde_json::Value; use std::collections::HashMap; use std::error::Error; use std::fs::File; @@ -307,6 +307,7 @@ pub enum HotWaterSourceDetails { heat_source_wet: HeatSourceWetType, #[serde(alias = "Control")] control: HeatSourceControlType, + #[allow(non_snake_case)] separate_DHW_tests: Value, // only known value here is "M&L" so looks too early to say this is an enum rejected_energy_1: f64, fuel_energy_2: f64, diff --git a/src/main.rs b/src/main.rs index 9e34da9..cff23e5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,7 +5,6 @@ mod read_weather_file; use clap::{Args, Parser}; use ecaas::read_weather_file::{weather_data_to_vec, ExternalConditions}; use ecaas::run_project; -use std::rc::Rc; #[derive(Parser, Default, Debug)] #[clap(author, version, about, long_about = None)]