Skip to content

Commit 50fd23a

Browse files
committed
Fix unnecessary closure (clippy)
1 parent 73bd296 commit 50fd23a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/src/refcount.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ impl RefCount {
4444
#[inline]
4545
pub fn safe_inc(&self) -> bool {
4646
self.strong
47-
.fetch_update(AcqRel, Acquire, |prev| (prev != 0).then(|| prev + 1))
47+
.fetch_update(AcqRel, Acquire, |prev| (prev != 0).then_some(prev + 1))
4848
.is_ok()
4949
}
5050

0 commit comments

Comments
 (0)