From 4ff3d79f892d07e6d88afbec7413e34251939053 Mon Sep 17 00:00:00 2001 From: Austin Hartzheim Date: Wed, 25 Dec 2024 16:04:12 -0600 Subject: [PATCH] fix: change cast order to be infallible on 32-bit targets --- src/state.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/state.rs b/src/state.rs index 4084893..86ba339 100644 --- a/src/state.rs +++ b/src/state.rs @@ -162,7 +162,7 @@ impl<'a, WL: WriteLockStrategy<'a>> StateContainer { 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)?;