Skip to content

Commit

Permalink
fix: change cast order to be infallible on 32-bit targets
Browse files Browse the repository at this point in the history
  • Loading branch information
austinhartzheim committed Dec 25, 2024
1 parent d476240 commit 4ff3d79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ impl<'a, WL: WriteLockStrategy<'a>> StateContainer<WL> {

let mut need_init = false;
// Reset state file size to match exactly `STATE_SIZE`
if state_file.metadata().map_err(FailedStateRead)?.len() as usize != STATE_SIZE {
if state_file.metadata().map_err(FailedStateRead)?.len() != STATE_SIZE as u64 {
state_file
.set_len(STATE_SIZE as u64)
.map_err(FailedStateRead)?;
Expand Down

0 comments on commit 4ff3d79

Please sign in to comment.