Skip to content

Commit

Permalink
deal with some warnings that are not to do with dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
shieldo committed Jul 25, 2023
1 parent 4adfbf0 commit b3aab32
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
7 changes: 3 additions & 4 deletions src/core/energy_supply/energy_supply.rs
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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,
Expand Down
5 changes: 2 additions & 3 deletions src/core/space_heat_demand/ventilation_element.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions src/external_conditions.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(non_snake_case)]

use crate::simulation_time::{SimulationTimeIterator, HOURS_IN_DAY};
use itertools::Itertools;
use serde::Deserialize;
Expand Down
3 changes: 2 additions & 1 deletion src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit b3aab32

Please sign in to comment.