Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a203105

Browse filesBrowse files
authored
Update README.md
1 parent cfd89ac commit a203105
Copy full SHA for a203105

File tree

1 file changed

+2
-2
lines changed
Filter options

1 file changed

+2
-2
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.