Skip to content

Commit 1792a48

Browse files
committed
Make clippy happy
Signed-off-by: Xuanwo <github@xuanwo.io>
1 parent 418565e commit 1792a48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/common/base/src/base/singleton_instance.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ impl Singleton {
4848
let guard = c.lock();
4949
let v: &T = guard
5050
.get(thread_name)
51-
.expect(&format!("thread {thread_name} is not initiated"))
51+
.unwrap_or_else(|| panic!("thread {thread_name} is not initiated"))
5252
.get();
5353
v.clone()
5454
}

0 commit comments

Comments
 (0)