format: one checked conversion from file address to index

addr::to_usize turns a 64-bit file address or length into a slice index,
failing with FormatError::Overflow where it does not fit usize (32-bit
targets such as wasm32) instead of truncating like an `as usize` cast.
Callers are converted in the following commits.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
osobh
2026-09-26 12:43:49 -05:00
co-authored by Claude Opus 5.5
parent f2ff2c424f
commit 6248b411f0
2 changed files with 60 additions and 0 deletions
+1
View File
@@ -57,6 +57,7 @@
#[cfg(not(feature = "std"))]
extern crate alloc;
pub mod addr;
pub mod attribute;
pub mod attribute_info;
pub mod btree_v1;