Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 213930a

Browse files
committed
try_lock() -> lock().await
1 parent 3b93467 commit 213930a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ async fn udp_serv() -> std::io::Result<()> {
4747
let map1= map.clone();
4848
let map2= map.clone();
4949
// Find cache
50-
let cache = map1.try_lock().unwrap();
50+
let cache = map1.lock().await;
5151
let cache = cache.get(&query[4..received + 2]);
5252
if let Some(cache) = cache {
5353
if log {

0 commit comments

Comments
 (0)