On Thu Oct 9, 2025 at 9:47 AM JST, Joel Fernandes wrote: > Currently, the BiosImage type in vbios code is implemented as a > type-wrapping enum with the sole purpose of implementing a type that is > common to all specific image types. To make this work, macros were used > to overcome limitations of using enums. Ugly match statements were also > required to route methods from the enum type to the specific image type. > > Simplify the code by just creating the common BiosImage type in the > iterator, and then converting it to specific image type after. This > works well since all the methods common to different BiosImage are > called only during the iteration and not later. Should we need to call > these common methods later, we can use AsRef and traits, but for now not > doing so gives us a nice ~50 negative line delta versus the existing code > and is a lot simpler. > > Also remove the now obsolete BiosImage enum type. > > Cc: Benno Lossin <[email protected]> > Signed-off-by: Joel Fernandes <[email protected]>
Pushed to drm-rust-next! Thank you.
