From a942f3e92b83d5013f6e48a9ed33ddae03e41a70 Mon Sep 17 00:00:00 2001 From: "C. Titus Brown" Date: Thu, 24 Aug 2023 06:55:31 -0700 Subject: [PATCH] fix last bits --- src/lib.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 45b83cb0..f0022230 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,6 @@ // TODO: -// * md5sum output by search and countergather are of modified/downsampled, -// not orig. This is different from sourmash... +// @CTB: test md5sum +// @CTB: cargo clippy/@CTB comments use pyo3::prelude::*; @@ -245,7 +245,7 @@ fn manysearch>( // make sure it is compatible etc. - if !search_sm.is_some() { + if search_sm.is_none() { eprintln!("WARNING: no compatible sketches in path '{}'", filename.display()); let _ = skipped_paths.fetch_add(1, atomic::Ordering::SeqCst); @@ -263,7 +263,7 @@ fn manysearch>( let containment = overlap / size; if containment > threshold { results.push((q.name.clone(), - q.minhash.md5sum(), + q.md5sum.clone(), search_sm.name.clone(), search_sm.md5sum.clone(), overlap)) @@ -358,7 +358,7 @@ fn write_prefetch + std::fmt::Debug + std::fmt::Display + Clone>( for m in matchlist.iter() { writeln!(&mut writer, "{},\"{}\",{},{}", query_label, - m.name, m.minhash.md5sum(), m.overlap).ok(); + m.name, m.md5sum, m.overlap).ok(); } Ok(()) @@ -519,7 +519,7 @@ fn consume_query_by_gather + std::fmt::Debug + std::fmt::Display query.remove_from(&best_element.minhash)?; writeln!(&mut writer, "{},{},\"{}\",{},{}", query_label, rank, - best_element.name, best_element.minhash.md5sum(), + best_element.name, best_element.md5sum, best_element.overlap).ok(); // recalculate remaining overlaps between query and all sketches.