From cc9250096c5895241e9c7ecb1d341785041a3896 Mon Sep 17 00:00:00 2001 From: "C. Titus Brown" Date: Sun, 22 Sep 2024 17:06:58 -0700 Subject: [PATCH] use 'expect' instead of 'unwrap' --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 59108b8..823724a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -58,7 +58,7 @@ impl KmerCountTable { 42, ); - let hashval = hashes.next().unwrap(); + let hashval = hashes.next().expect("error hashing this k-mer"); Ok(hashval?) } } @@ -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,