Skip to content

Commit 2d163cf

Browse files
authored
synchronize example with src/lib.rs (#956)
Made plural to match lib/rs.
1 parent 1fdca20 commit 2d163cf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

exercises/protein-translation/example.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
use std::collections::HashMap;
22

3-
pub struct CodonInfo<'a> {
3+
pub struct CodonsInfo<'a> {
44
actual_codons: HashMap<&'a str, &'a str>,
55
}
66

7-
pub fn parse<'a>(pairs: Vec<(&'a str, &'a str)>) -> CodonInfo<'a> {
8-
CodonInfo {
7+
pub fn parse<'a>(pairs: Vec<(&'a str, &'a str)>) -> CodonsInfo<'a> {
8+
CodonsInfo {
99
actual_codons: pairs.into_iter().collect(),
1010
}
1111
}
1212

13-
impl<'a> CodonInfo<'a> {
13+
impl<'a> CodonsInfo<'a> {
1414
pub fn name_for(&self, codon: &str) -> Option<&'a str> {
1515
self.actual_codons.get(&codon).cloned()
1616
}

0 commit comments

Comments
 (0)