Debian Codegraph @

tests/hello_world.rs

raw symbols SCIP
1 //! This is the Hello World example from the README.
2
3 #[test]
4 fn main() {
5 // A bijective map between letters of the English alphabet and their positions.
6 let mut alphabet = bimap::BiMap::<char, u8>::new();
7
8 alphabet.insert('A', 1);
9 // some letters omitted for brevity
10 alphabet.insert('Z', 26);
11
12 println!("A is at position {}", alphabet.get_by_left(&'A').unwrap());
13 println!("{} is at position 26", alphabet.get_by_right(&26).unwrap());
14 }