Home
last modified time | relevance | path

Searched refs:HASHMAP (Results 1 – 3 of 3) sorted by relevance

/third_party/rust/crates/once_cell/examples/
Dlazy_static.rs6 static HASHMAP: Lazy<HashMap<u32, &'static str>> = Lazy::new(|| { variable
28 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()
/third_party/rust/crates/lazy-static.rs/
DREADME.md48 static ref HASHMAP: HashMap<u32, &'static str> = {
58 // First access to `HASHMAP` initializes it
59 println!("The entry for `0` is \"{}\".", HASHMAP.get(&0).unwrap());
61 // Any further access to `HASHMAP` just returns the computed value
62 println!("The entry for `1` is \"{}\".", HASHMAP.get(&1).unwrap());
/third_party/rust/crates/lazy-static.rs/tests/
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()