Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor string enums to integer representations, add optional snippet optimizations #512

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
clippy
  • Loading branch information
shanemadden committed Oct 4, 2024
commit c85337cdc962c7d6d959e75d24bb86b5467b5318
2 changes: 1 addition & 1 deletion src/constants/part.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ impl Part {
PART_NUM_TO_STR_MAP.with(|map| {
// SAFETY: &[Part] contains u8 values because it's repr(u8), safe to transmute
// to &[u8]
part_nums_to_str_array(map, unsafe { std::mem::transmute(parts) })
part_nums_to_str_array(map, unsafe { std::mem::transmute::<&[Part], &[u8]>(parts) })
})
}

Expand Down
Loading