Searched refs:HASHMAP (Results 1 – 3 of 3) sorted by relevance
6 static HASHMAP: Lazy<HashMap<u32, &'static str>> = Lazy::new(|| { variable28 println!("The entry for `0` is \"{}\".", HASHMAP.get(&0).unwrap()); in main()31 println!("The entry for `1` is \"{}\".", HASHMAP.get(&1).unwrap()); in main()
48 static ref HASHMAP: HashMap<u32, &'static str> = {58 // First access to `HASHMAP` initializes it59 println!("The entry for `0` is \"{}\".", HASHMAP.get(&0).unwrap());61 // Any further access to `HASHMAP` just returns the computed value62 println!("The entry for `1` is \"{}\".", HASHMAP.get(&1).unwrap());
16 static ref HASHMAP: HashMap<u32, &'static str> = {51 assert!(HASHMAP.get(&1).is_some()); in test_basic()52 assert!(HASHMAP.get(&3).is_none()); in test_basic()