Replace manual layer path construction with obilayeredmap::layer_dir

Standardizes layer directory path resolution across obikindex, obikpartitionner, and obikphylo by replacing inline string formatting and join calls with the centralized obilayeredmap::layer_dir utility. This refactoring removes redundant path construction logic while preserving existing iteration bounds, control flow, and public APIs.
This commit is contained in:
Eric Coissac
2026-08-20 14:54:13 +02:00
parent 5a91817488
commit 7eaa8c2016
14 changed files with 43 additions and 43 deletions
+2 -3
View File
@@ -7,7 +7,7 @@ use rayon::prelude::*;
use obikpartitionner::KmerPartition;
use obipipeline::ThrottleGuard;
use obikseq::CanonicalKmer;
use obilayeredmap::MphfLayer;
use obilayeredmap::{layer_dir, MphfLayer};
use obilayeredmap::meta::PartitionMeta;
use obisys::progress_bar;
@@ -101,8 +101,7 @@ impl SiblingAnnexBuildExt for KmerIndex {
let mut part_slots: u64 = 0;
for l in 0..meta.n_layers {
let layer_dir = index_dir.join(format!("layer_{l}"));
part_slots += build_layer_sibling_annex(self, &layer_dir, n_parts, l, &cache)?;
part_slots += build_layer_sibling_annex(self, &layer_dir(&index_dir, l), n_parts, l, &cache)?;
}
total_slots += part_slots;
pb.inc(1);