Skip to content

Commit

Permalink
use 'expect' instead of 'unwrap' (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
ctb authored Sep 23, 2024
1 parent f9f2953 commit bef0bbd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl KmerCountTable {
42,
);

let hashval = hashes.next().unwrap();
let hashval = hashes.next().expect("error hashing this k-mer");
Ok(hashval?)
}
}
Expand Down Expand Up @@ -88,7 +88,7 @@ impl KmerCountTable {
"kmer size does not match count table ksize",
))
} else {
let hashval = self.hash_kmer(kmer).unwrap();
let hashval = self.hash_kmer(kmer).expect("error hashing this k-mer");

let count = match self.counts.get(&hashval) {
Some(count) => count,
Expand Down

0 comments on commit bef0bbd

Please sign in to comment.