format: no truncating u64 -> usize casts in gather_storage and ExtentBytes

check-32bit-casts.sh flagged two casts added by the previous commits; both
values are bounded (checked by gather_storage's first walk, and built from
a usize fetch length), so they go through addr::saturating_usize.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
osobh
2026-09-26 19:05:45 -05:00
co-authored by Claude Opus 5.5
parent 75444950f3
commit ea0508aaa5
2 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -477,7 +477,8 @@ impl<'a> ExtentBytes<'a> {
));
}
for ((slot, bytes), r) in slots.into_iter().zip(got).zip(&ranges) {
out[slot] = Extent::Bytes(exact_len(bytes, (r.end - r.start) as usize)?);
let len = crate::addr::saturating_usize(r.end - r.start);
out[slot] = Extent::Bytes(exact_len(bytes, len)?);
}
}
Ok(ExtentBytes::Fetched { base, extents: out })