Home
last modified time | relevance | path

Searched refs:HASHMAP (Results 1 - 2 of 2) sorted by relevance

/third_party/rust/crates/once_cell/examples/
H A Dlazy_static.rs6 static HASHMAP: Lazy<HashMap<u32, &'static str>> = Lazy::new(|| { consts
27 // First access to `HASHMAP` initializes it in main()
28 println!("The entry for `0` is \"{}\".", HASHMAP.get(&0).unwrap()); in main()
30 // Any further access to `HASHMAP` just returns the computed value in main()
31 println!("The entry for `1` is \"{}\".", HASHMAP.get(&1).unwrap()); in main()
/third_party/rust/crates/lazy-static.rs/tests/
H A Dtest.rs16 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()

Completed in 2 milliseconds