style: format workspace with Rust 1.97
Docs Deploy / Build and Deploy MkDocs (push) Successful in 36s
Test / Lint (push) Failing after 2m31s
Test / Test (push) Skipped
Test / Render parity (push) Skipped

This commit is contained in:
2026-07-18 05:28:07 +04:00
parent 02b4da2e3d
commit 2da28d0495
8 changed files with 147 additions and 96 deletions
+6 -5
View File
@@ -802,10 +802,8 @@ fn parse_entries(
header: &NresHeader,
limits: DecodeLimits,
) -> Result<Vec<NresEntry>, NresError> {
let capacity = checked_allocation_len(
u64::from(header.entry_count),
u64::from(limits.max_entries),
)?;
let capacity =
checked_allocation_len(u64::from(header.entry_count), u64::from(limits.max_entries))?;
let mut entries = Vec::with_capacity(capacity);
let directory_offset =
usize::try_from(header.directory_offset).map_err(|_| DecodeError::IntegerOverflow)?;
@@ -1629,7 +1627,10 @@ mod tests {
..DecodeLimits::default()
}
),
Err(NresError::Binary(DecodeError::LimitExceeded { count: 2, limit: 1 }))
Err(NresError::Binary(DecodeError::LimitExceeded {
count: 2,
limit: 1
}))
));
}