Skip to content

Commit

Permalink
fix lints and msrv (older backtrace crate)
Browse files Browse the repository at this point in the history
  • Loading branch information
luizirber committed Jun 24, 2020
1 parent 7537b3f commit ca40809
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ parallel = ["rayon"]
#cbindgen = "~0.14.2"

[dependencies]
backtrace = "=0.3.46" # later versions require rust 1.40
byteorder = "1.3.4"
cfg-if = "0.1.10"
failure = "0.1.8"
Expand Down
8 changes: 3 additions & 5 deletions src/core/src/sketch/minhash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1476,10 +1476,8 @@ impl KmerMinHashBTree {
{
// "good" hash - within range, smaller than current entry, or
// still have space available
if self.mins.insert(hash) {
if hash > self.current_max {
self.current_max = hash;
}
if self.mins.insert(hash) && hash > self.current_max {
self.current_max = hash;
}
if let Some(ref mut abunds) = self.abunds {
*abunds.entry(hash).or_insert(0) += abundance;
Expand Down Expand Up @@ -1530,7 +1528,7 @@ impl KmerMinHashBTree {
self.num as usize
};

self.mins = union.into_iter().take(to_take).cloned().collect();
self.mins = union.take(to_take).cloned().collect();

if let Some(abunds) = &self.abunds {
if let Some(oabunds) = &other.abunds {
Expand Down

0 comments on commit ca40809

Please sign in to comment.