This is an automated email from the ASF dual-hosted git repository.

gkoszyk pushed a commit to branch partitions_refactor
in repository https://gitbox.apache.org/repos/asf/iggy.git

commit 14f711f842863bc8c3ebe39049559443f63731d7
Author: numinex <[email protected]>
AuthorDate: Tue Mar 10 10:05:41 2026 +0100

    clipy lint
---
 core/partitions/src/iggy_partition.rs | 2 +-
 core/partitions/src/journal.rs        | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/core/partitions/src/iggy_partition.rs 
b/core/partitions/src/iggy_partition.rs
index bf309a7c8..81a771fe7 100644
--- a/core/partitions/src/iggy_partition.rs
+++ b/core/partitions/src/iggy_partition.rs
@@ -57,7 +57,7 @@ impl IggyPartition {
         let count = batch.count();
         let body_len = 4 + indexes.len() + batch.len();
         let total_size = std::mem::size_of::<PrepareHeader>() + body_len;
-        header.size = total_size as u32;
+        header.size = 
u32::try_from(total_size).expect("prepare_message_from_batch: batch size 
exceeds u32::MAX");
 
         let message = 
Message::<PrepareHeader>::new(total_size).transmute_header(|_old, new| {
             *new = header;
diff --git a/core/partitions/src/journal.rs b/core/partitions/src/journal.rs
index 2139290d3..8bf9d2a30 100644
--- a/core/partitions/src/journal.rs
+++ b/core/partitions/src/journal.rs
@@ -32,7 +32,9 @@ const ZERO_LEN: usize = 0;
 /// Lookup key for querying messages from the journal.
 #[derive(Debug, Clone, Copy)]
 pub enum MessageLookup {
+    #[allow(dead_code)]
     Offset { offset: u64, count: u32 },
+    #[allow(dead_code)]
     Timestamp { timestamp: u64, count: u32 },
 }
 
@@ -152,7 +154,7 @@ impl PartitionJournalMemStorage {
 }
 
 impl PartitionJournal2Impl<PartitionJournalMemStorage> {
-    /// Drain all accumulated batches, matching the legacy PartitionJournal 
API.
+    /// Drain all accumulated batches, matching the legacy `PartitionJournal` 
API.
     pub fn commit(&self) -> IggyMessagesBatchSet {
         let entries = {
             let inner = unsafe { &*self.inner.get() };

Reply via email to