Browse Source

flowcells sort by modified

Thomas 6 months ago
parent
commit
0e1603298a
2 changed files with 6 additions and 1 deletions
  1. 5 0
      src/collection/flowcells.rs
  2. 1 1
      src/lib.rs

+ 5 - 0
src/collection/flowcells.rs

@@ -388,6 +388,11 @@ impl FlowCells {
 
         Ok(())
     }
+
+    /// Sorts `flow_cells` in-place from oldest (`modified` smallest) to newest.
+    pub fn sort_by_modified(&mut self) {
+        self.flow_cells.sort_by_key(|fc| fc.modified);
+    }
 }
 
 /// Represents a fully described flowcell unit, including experimental metadata,

+ 1 - 1
src/lib.rs

@@ -466,7 +466,7 @@ mod tests {
     #[test]
     fn run_severus() -> anyhow::Result<()> {
         init();
-        Severus::initialize("PONSOT", Config::default())?.run()
+        Severus::initialize("BANGA", Config::default())?.run()
     }
 
     // #[test]