Skip to content

Commit 2dbdd9b

Browse files
committed
Allow assets.csv input file to be empty
Fixes #851.
1 parent e0f8b17 commit 2dbdd9b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/input/asset.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Code for reading [Asset]s from a CSV file.
2-
use super::{input_err_msg, read_csv};
2+
use super::{input_err_msg, read_csv_optional};
33
use crate::agent::AgentID;
44
use crate::asset::Asset;
55
use crate::id::IDCollection;
@@ -43,7 +43,7 @@ pub fn read_assets(
4343
region_ids: &IndexSet<RegionID>,
4444
) -> Result<Vec<Asset>> {
4545
let file_path = model_dir.join(ASSETS_FILE_NAME);
46-
let assets_csv = read_csv(&file_path)?;
46+
let assets_csv = read_csv_optional(&file_path)?;
4747
read_assets_from_iter(assets_csv, agent_ids, processes, region_ids)
4848
.with_context(|| input_err_msg(&file_path))
4949
}

0 commit comments

Comments
 (0)