Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ctb committed Oct 13, 2024
1 parent 87118de commit ee296e7
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
9 changes: 8 additions & 1 deletion src/fastgather.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,14 @@ pub fn fastgather(
let query_filename = query_sig.filename();
let query_name = query_sig.name();
let query_md5 = query_sig.md5sum();
write_prefetch(query_filename, query_name, query_md5, prefetch_output, &matchlist).ok();
write_prefetch(
query_filename,
query_name,
query_md5,
prefetch_output,
&matchlist,
)
.ok();
}

// run the gather!
Expand Down
19 changes: 11 additions & 8 deletions src/fastmultigather.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,9 @@ pub fn fastmultigather(
if let Ok(overlap) = against.minhash.count_common(query_mh, false) {
if overlap >= threshold_hashes {
if save_matches {
if let Ok(intersection) =
against.minhash.intersection(query_mh)
if let Ok(intersection) = against.minhash.intersection(query_mh)
{
matching_hashes
.as_mut()
.unwrap()
.extend(intersection.0);
matching_hashes.as_mut().unwrap().extend(intersection.0);
}
}
let result = PrefetchResult {
Expand All @@ -129,7 +125,14 @@ pub fn fastmultigather(
let gather_output = format!("{}.gather.csv", location);

// Save initial list of matches to prefetch output
write_prefetch(query_filename, query_name, query_md5, Some(prefetch_output), &matchlist).ok();
write_prefetch(
query_filename,
query_name,
query_md5,
Some(prefetch_output),
&matchlist,
)
.ok();

// Now, do the gather!
consume_query_by_gather(
Expand All @@ -139,7 +142,7 @@ pub fn fastmultigather(
threshold_hashes,
Some(gather_output),
)
.ok();
.ok();

// Save matching hashes to .sig file if save_matches is true
if save_matches {
Expand Down
7 changes: 1 addition & 6 deletions src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,7 @@ pub fn write_prefetch(
writeln!(
&mut writer,
"{},\"{}\",{},\"{}\",{},{}",
query_filename,
query_name,
query_md5,
m.name,
m.md5sum,
m.overlap
query_filename, query_name, query_md5, m.name, m.md5sum, m.overlap
)
.ok();
}
Expand Down

0 comments on commit ee296e7

Please sign in to comment.