We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a8afb21 commit fc8e466Copy full SHA for fc8e466
README.md
@@ -69,9 +69,8 @@ It is now possible to easily replicate this crate's functionality in Rust's stan
69
use std::collections::HashMap;
70
use std::sync::OnceLock;
71
72
-static HASHMAP: OnceLock<HashMap<u32, &'static str>> = OnceLock::new();
73
-
74
fn hashmap() -> &'static HashMap<u32, &'static str> {
+ static HASHMAP: OnceLock<HashMap<u32, &'static str>> = OnceLock::new();
75
HASHMAP.get_or_init(|| {
76
let mut m = HashMap::new();
77
m.insert(0, "foo");
0 commit comments