Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
frewsxcv committed Nov 25, 2023
1 parent a8afb21 commit fc8e466
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,8 @@ It is now possible to easily replicate this crate's functionality in Rust's stan
use std::collections::HashMap;
use std::sync::OnceLock;

static HASHMAP: OnceLock<HashMap<u32, &'static str>> = OnceLock::new();

fn hashmap() -> &'static HashMap<u32, &'static str> {
static HASHMAP: OnceLock<HashMap<u32, &'static str>> = OnceLock::new();
HASHMAP.get_or_init(|| {
let mut m = HashMap::new();
m.insert(0, "foo");
Expand Down

0 comments on commit fc8e466

Please sign in to comment.