Skip to content

Conversation

@danielsreichenbach
Copy link
Member

Summary

This PR fixes CI failures that are blocking other PRs from merging. The failures were caused by clippy warnings being treated as errors in the stable Rust toolchain.

Changes

1. Fixed unnecessary unsafe blocks in SIMD code

  • Removed 22 redundant unsafe blocks within already-unsafe functions in file-formats/archives/wow-mpq/src/simd/x86_64.rs
  • The stable Rust compiler now recognizes that intrinsics called within unsafe fn don't need additional unsafe blocks
  • Maintains compatibility with both MSRV (1.86.0) and stable Rust

2. Updated deprecated IO error creation

  • Changed from io::Error::new(io::ErrorKind::Other, msg) to io::Error::other(msg) in error.rs
  • Uses the newer, more concise API introduced in recent Rust versions

Test Plan

✅ All tests pass locally with both toolchains:

  • cargo test --package wow-mpq --all-features
  • cargo clippy --package wow-mpq --all-features -- -D warnings (with stable toolchain)

Impact

This unblocks CI for all pending PRs, including the WMO parser rewrite that was incorrectly appearing to have failures.

- Add lint configuration to handle unsafe block requirements across Rust versions
- Update io::Error creation to use newer io::Error::other() method
- Fix CI failures for both MSRV (1.86.0) and stable Rust toolchain

The SIMD code now properly handles different lint requirements between
Rust versions by allowing both unused_unsafe and unsafe_op_in_unsafe_fn
lints, ensuring compatibility across all supported Rust versions.
@danielsreichenbach danielsreichenbach merged commit 0edc0dc into main Sep 24, 2025
18 of 19 checks passed
@danielsreichenbach danielsreichenbach deleted the 002-fix-mpq-unsafe-blocks branch September 24, 2025 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants