Skip to content

Commit a203105

Browse files
authored
Update README.md
1 parent cfd89ac commit a203105

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ use lazy_static::lazy_static;
4343
use std::collections::HashMap;
4444

4545
lazy_static! {
46-
static ref HASHMAP: HashMap<u32, &str> = {
46+
static ref HASHMAP: HashMap<u32, &'static str> = {
4747
let mut m = HashMap::new();
4848
m.insert(0, "foo");
4949
m.insert(1, "bar");
@@ -70,7 +70,7 @@ use std::collections::HashMap;
7070
use std::sync::OnceLock;
7171

7272
fn hashmap() -> &'static HashMap<u32, &'static str> {
73-
static HASHMAP: OnceLock<HashMap<u32, &'static str>> = OnceLock::new();
73+
static HASHMAP: OnceLock<HashMap<u32, &str>> = OnceLock::new();
7474
HASHMAP.get_or_init(|| {
7575
let mut m = HashMap::new();
7676
m.insert(0, "foo");

0 commit comments

Comments
 (0)