fn extend_kmer(kmer: &mut BitKmer, new_char: u8) -> bool {
    if let Some(new_char_int) = nuc2bti_lookup_nocheck(new_char) {
        let new_kmer = (kmer.0 << 2) + new_char_int as BitKmerSeq;

        // mask out any overflowed bits
        kmer.0 = new_kmer & (BitKmerSeq::pow(2, u32::from(2 * kmer.1)) - 1) as BitKmerSeq;
        true
    } else {
        false
    }
}
/// Takes a BitKmer and adds a new base on the end, optionally loping off the
/// first base if the resulting kmer is too long.
Takes a BitKmer and adds a new base on the end, optionally loping off the
first base if the resulting kmer is too long.
Takes a BitKmer and adds a new base on the end optionally loping off the first base if the resulting kmer is too long .
fn extend_kmer(kmer: &mut BitKmer, new_char: u8) -> bool {
    if let Some(new_char_int) = nuc2bti_lookup_nocheck(new_char) {
        let new_kmer = (kmer.0 << 2) + new_char_int as BitKmerSeq;
        // mask out any overflowed bits
        kmer.0 = new_kmer & (BitKmerSeq::pow(2, u32::from(2 * kmer.1)) - 1) as BitKmerSeq;
        true
    } else {
        false
    }
}
fn extend_kmer ( kmer : & mut BitKmer , new_char : u8 ) -> bool { if let Some ( new_char_int ) = nuc2bti_lookup_nocheck ( new_char ) { let new_kmer = ( kmer . 0 << 2 ) + new_char_int as BitKmerSeq ; // mask out any overflowed bits kmer . 0 = new_kmer & ( BitKmerSeq :: pow ( 2 , u32 :: from ( 2 * kmer . 1 ) ) - 1 ) as BitKmerSeq ; true } else { false } }
Takes a BitKmer and adds a new base on the end, optionally loping off the
first base if the resulting kmer is too long.
Takes a BitKmer and adds a new base on the end optionally loping off the first base if the resulting kmer is too long .
kmer
&mut BitKmer
new_char
u8