Skip to content

Commit 1cb3dbb

Browse files
committed
fix clippy
1 parent a2690f7 commit 1cb3dbb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/src/common/ordered_work_steal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ impl<'l, T: Debug> OrderedLocalQueue<'l, T> {
347347
/// ```
348348
pub fn pop(&self) -> Option<T> {
349349
//每从本地弹出61次,就从全局队列弹出
350-
if self.tick() % 61 == 0 {
350+
if self.tick().is_multiple_of(61) {
351351
if let Some(val) = self.shared.pop() {
352352
return Some(val);
353353
}

core/src/common/work_steal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ impl<'l, T: Debug> LocalQueue<'l, T> {
278278
/// ```
279279
pub fn pop(&self) -> Option<T> {
280280
//每从本地弹出61次,就从全局队列弹出
281-
if self.tick() % 61 == 0 {
281+
if self.tick().is_multiple_of(61) {
282282
if let Some(val) = self.shared.pop() {
283283
return Some(val);
284284
}

0 commit comments

Comments
 (0)