nucleotide/src/lib.rs should be
use std::collections::HashMap;
/// Count the number of occurrences of each of the four nucleotides
/// G, A, C, T.
pub fn nucleotide_counts(dna: &str) -> Result<HashMap<char, usize>, ()> {
unimplemented!("Count the occurrences of G, A, C, T in {}.", dna);
}
/// Count the number of occurrences of a given nucleotide,
/// which must be either G, A, C or T.
pub fn count(nuc: char, dna: &str) -> Result<usize, ()> {
unimplemented!("Count the occurrences of {} in {}.", nuc, dna);
}
Also, these should arguably return Option instead of Result, or just panic!() with a failed assert!() on bad input.
nucleotide/src/lib.rsshould beAlso, these should arguably return
Optioninstead ofResult, or justpanic!()with a failedassert!()on bad input.