Browse Source

Flowcells default

Thomas 8 months ago
parent
commit
8be5f1a035
1 changed files with 2 additions and 4 deletions
  1. 2 4
      src/collection/flowcells.rs

+ 2 - 4
src/collection/flowcells.rs

@@ -111,7 +111,7 @@ impl IdsInput {
 /// - [`FlowCellLocation`]: Indicates source (local or archive)
 /// - [`MinKnowSampleSheet`]: Parsed sample sheet data
 /// - [`IdInput`]: Case-level annotation applied to flowcells
-#[derive(Debug, Serialize, Deserialize, Clone)]
+#[derive(Debug, Serialize, Deserialize, Clone, Default)]
 pub struct FlowCells {
     /// A collection of parsed flowcell metadata records.
     pub flow_cells: Vec<FlowCell>,
@@ -135,9 +135,7 @@ impl FlowCells {
         inputs_path: &str,
         archive_store_path: &str,
     ) -> anyhow::Result<Self> {
-        let mut instance = Self {
-            flow_cells: Vec::new(),
-        };
+        let mut instance = Self::default();
 
         instance.load_from_archive(archive_store_path)?;
         instance.load_from_local(local_run_dir)?;