Actually mark RelativePath as transparent#2693
Merged
Sebastian Thiel (Byron) merged 2 commits intoJul 6, 2026
Merged
Conversation
The GitHub Actions lint job failed while running `just clippy -D warnings -A unknown-lints --no-deps`. Clippy reported `missing-transmute-annotations` for the unsafe cast from `&BStr` to `&RelativePath` in `gix-path/src/relative_path.rs`. This annotates the transmute with its source and target reference types, preserving the existing transparent wrapper conversion while satisfying the lint.
Sebastian Thiel (Byron)
approved these changes
Jul 6, 2026
Sebastian Thiel (Byron)
left a comment
Member
There was a problem hiding this comment.
Thanks so much, I really should try not to write unsafe code!
In this particular instance, I'm pretty sure I copied it from the bstr crate - maybe that went terribly wrong, or maybe there is something there as well.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2692
I went ahead and cleaned up the Result there as well, the layout of Result is not well defined.
It worked anyway because of niche optimizations, I think, but we can't rely on that here.