Skip to content

Commit 308f06a

Browse files
committed
Lint
1 parent e53e961 commit 308f06a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

storage/src/nodestore/persist.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ impl NodeStore<Committed, FileBacked> {
231231
node.persist_at(persisted_address);
232232

233233
// Decrement gauge immediately after node is written to storage
234+
#[expect(clippy::cast_possible_truncation)]
234235
gauge!("firewood.nodes.unwritten").decrement(1.0);
235236

236237
// Move the arc to a vector of persisted nodes for caching
@@ -333,7 +334,7 @@ impl NodeStore<Committed, FileBacked> {
333334
));
334335
}
335336
pbe.offset = None;
336-
completed_count += 1;
337+
completed_count = completed_count.wrapping_add(1);
337338
}
338339
Ok(completed_count)
339340
}
@@ -424,6 +425,7 @@ impl NodeStore<Committed, FileBacked> {
424425

425426
// Decrement gauge for writes that have actually completed
426427
if completed_writes > 0 {
428+
#[expect(clippy::cast_possible_truncation)]
427429
gauge!("firewood.nodes.unwritten").decrement(completed_writes as f64);
428430
}
429431
}
@@ -446,6 +448,7 @@ impl NodeStore<Committed, FileBacked> {
446448

447449
// Decrement gauge for final batch of writes that completed
448450
if final_completed_writes > 0 {
451+
#[expect(clippy::cast_possible_truncation)]
449452
gauge!("firewood.nodes.unwritten").decrement(final_completed_writes as f64);
450453
}
451454

0 commit comments

Comments
 (0)