Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
ctb committed Nov 2, 2024
1 parent d9bbc21 commit 446aaed
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ impl HashIntoType {
}

/// Conversion into u64.
impl Into<u64> for HashIntoType {
fn into(self: HashIntoType) -> u64 {
return self.0;
impl From<HashIntoType> for u64 {
fn from(val: HashIntoType) -> Self {
val.0
}
}

Expand Down Expand Up @@ -680,7 +680,6 @@ impl KmerCountTable {
Ok(0) => continue,
Ok(x) => {
self.count_hash(x);
()
}
Err(_) => {
let msg = format!("bad k-mer encountered at position {}", n);
Expand Down Expand Up @@ -932,7 +931,7 @@ impl KmerCountTable {
// non-Python accessible methods
impl KmerCountTable {
// merge two tables that may have overlapping k-mers.
fn _merge(&mut self, other: KmerCountTable) -> () {
fn _merge(&mut self, other: KmerCountTable) {
for (hashval, count) in other.counts.iter() {
let this_count = self.counts.entry(*hashval).or_insert(0);
*this_count += count;
Expand All @@ -946,7 +945,6 @@ impl KmerCountTable {
// here, this will replace, but that's ok.
my_hash_to_kmer.extend(t_hash_to_kmer);
}
()
}
}

Expand Down

0 comments on commit 446aaed

Please sign in to comment.