Skip to content

Commit c6ce463

Browse files
committed
rust: fix lint warnings
Signed-off-by: Piyush Jena <[email protected]>
1 parent 2035eef commit c6ce463

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

sources/api/apiclient/src/exec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ impl ReadFromUser {
493493

494494
// Occasionally log that we're still waiting, if someone is watching at trace level.
495495
waited += 1;
496-
if waited % 100 == 0 {
496+
if waited.is_multiple_of(100) {
497497
trace!("Waiting for server capacity...");
498498
}
499499
sleep(Duration::from_millis(10));

sources/api/apiserver/src/server/exec/child.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ impl WriteToChild {
430430
messages_written += 1;
431431
// Every so often, send a capacity update to the client so it knows what we've written
432432
// and how many messages we're willing to accept.
433-
if messages_written % CAPACITY_UPDATE_INTERVAL == 0 {
433+
if messages_written.is_multiple_of(CAPACITY_UPDATE_INTERVAL) {
434434
let capacity = Capacity {
435435
max_messages_outstanding: MAX_MESSAGES_OUTSTANDING,
436436
messages_written,

0 commit comments

Comments
 (0)