Skip to content

Revert nonnull optimizations and remove as casts#53

Open
dilr wants to merge 4 commits intoandylokandy:masterfrom
dilr:revert_nonnull
Open

Revert nonnull optimizations and remove as casts#53
dilr wants to merge 4 commits intoandylokandy:masterfrom
dilr:revert_nonnull

Conversation

@dilr
Copy link
Copy Markdown

@dilr dilr commented Aug 2, 2025

As per #52, this reverts the non-null optimizations. Additionally to keep the CI from complaining this time, I have converted as pointer casts to use .cast() or .cast_mut(). I can remove this second part if needed.

@dilr
Copy link
Copy Markdown
Author

dilr commented Aug 3, 2025

I've mixed back in the changes which make ZSTs allocate on the "heap". This revert came out less clean, but the tests pass under miri.

@dilr
Copy link
Copy Markdown
Author

dilr commented Aug 4, 2025

The previous commit fixes the issue that occurred in CI. It does switch back to an as cast, but I tested with the clippy invocation from .github/workflows and it doesn't seem like clippy is complaining about the cast this time. Clippy must have some heuristic to tell when you are immediately converting a casted pointer to an address.

I've also run fmt and a test with the 1.80.0 toolchain, so this commit should pass the CI.

dilr and others added 2 commits August 6, 2025 12:09
Co-authored-by: Andy Lok <andylokandy@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants