avoid packed struct with non-Copy fields
redox_uefi is one of the few crates that was identified as part of https://github.com/rust-lang/rust/pull/104429 to have a packed struct with a built-in derive and a non-Copy
field where furthermore the packed
does not actually change the layout at all. (If it did change the layout, the derive
would have complained about unaligned references. Usually built-in derive
on packed types required derive(Copy)
but there is a basically accidental exception for types where packed
ends up not changing the layout at all.) This affects the types IfrCheckbox
and IfrNumeric
. This MR fixes that by making IfrOpHeader
Copy
.
Note: the types IfrCheckbox
and IfrNumeric
have comments saying "Has incorrect size if not packed", but I think that is wrong -- all fields of those types have alignment 1, so packed
makes no difference.