This is an automated email from the ASF dual-hosted git repository.
numinnex pushed a commit to branch partition_superblock
in repository https://gitbox.apache.org/repos/asf/iggy.git
The following commit(s) were added to refs/heads/partition_superblock by this
push:
new f0d86f44a fix clippy
f0d86f44a is described below
commit f0d86f44a2e5df5a04525a42369b2214599b5b9d
Author: Grzegorz Koszyk <[email protected]>
AuthorDate: Thu Aug 6 16:29:00 2026 +0200
fix clippy
---
core/shard/src/lib.rs | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/core/shard/src/lib.rs b/core/shard/src/lib.rs
index 803e74de3..5563f219c 100644
--- a/core/shard/src/lib.rs
+++ b/core/shard/src/lib.rs
@@ -6659,15 +6659,18 @@ where
let Some(session) = partition.transfer.as_mut() else {
return;
};
- // `session.peer` too, not the nonce alone. The other three
- // partition-transfer handlers all validate their sender; this one
+ if session.nonce != header.nonce || !session.target_accepted {
+ return;
+ }
+ // The sender too, not the nonce alone. The other three
+ // partition-transfer handlers all validate theirs; this one
// authenticated payload bytes by a 128-bit capability only, which
// is thin but real once a peer has seen one frame -- a
rotated-away
- // peer still holds the nonce until the session is re-minted.
- if session.nonce != header.nonce
- || session.peer != header.replica
- || !session.target_accepted
- {
+ // peer still holds the nonce until the session is re-minted. Its
+ // own `if` because folded into the condition above, clippy's
+ // `suspicious_operation_groupings` reads the operand asymmetry as
a
+ // typo and proposes a `header.peer` that does not exist.
+ if session.peer != header.replica {
return;
}
let payload =
&msg.as_slice()[size_of::<StateChunkHeader>()..header.size as usize];