Skip to content

Commit

Permalink
MRG: fix clippy issues; bump version to 0.4.1 (#27)
Browse files Browse the repository at this point in the history
* update Cargo.lock too

* fix clippy stuff

* bump version
  • Loading branch information
ctb authored Aug 14, 2023
1 parent 5b320e1 commit f814805
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pyo3-branchwater"
version = "0.4.0"
version = "0.4.1"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
12 changes: 6 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ fn search<P: AsRef<Path>>(

let mut search_mh = None;
// load search signature from path:
let search_sig = &Signature::from_path(&filename)
let search_sig = &Signature::from_path(filename)
.unwrap_or_else(|_| panic!("Error processing {:?}", filename))[0];

// make sure it is compatible etc.
Expand Down Expand Up @@ -385,7 +385,7 @@ fn load_sketches(sketchlist_paths: Vec<PathBuf>, template: &Sketch) ->

let mut sm = None;
for sig in &sigs {
if let Some(mh) = prepare_query(sig, &template) {
if let Some(mh) = prepare_query(sig, template) {
sm = Some(SmallSignature {
name: sig.name(),
minhash: mh,
Expand Down Expand Up @@ -416,8 +416,8 @@ fn load_sketches_above_threshold(

let mut mm = None;
for sig in &sigs {
if let Some(mh) = prepare_query(sig, &template) {
if let Ok(overlap) = mh.count_common(&query, false) {
if let Some(mh) = prepare_query(sig, template) {
if let Ok(overlap) = mh.count_common(query, false) {
if overlap >= threshold_hashes {
let result = PrefetchResult {
name: sig.name(),
Expand Down Expand Up @@ -472,7 +472,7 @@ fn consume_query_by_gather<P: AsRef<Path> + std::fmt::Debug + std::fmt::Display
// recalculate remaining overlaps between query and all sketches.
// note: this is parallelized.
matching_sketches = prefetch(&query, matching_sketches, threshold_hashes);
rank = rank + 1;
rank += 1;
}
Ok(())
}
Expand Down Expand Up @@ -642,7 +642,7 @@ fn multigather<P: AsRef<Path> + std::fmt::Debug + Clone>(
})
.collect();

if matchlist.len() > 0 {
if !matchlist.is_empty() {
let prefetch_output = format!("{query_label}.prefetch.csv");
let gather_output = format!("{query_label}.gather.csv");

Expand Down

0 comments on commit f814805

Please sign in to comment.