Please re-export IntoDynamicImageError as public #13222
Labels
A-Rendering
Drawing game state to the screen
C-Usability
A simple quality-of-life change that makes Bevy easier to use
D-Trivial
Nice and easy! A great choice to get started with Bevy
S-Ready-For-Implementation
This issue is ready for an implementation PR. Go for it!
X-Uncontroversial
This work is generally agreed upon
What problem does this solve or what need does it fill?
When working with image data directly, it's useful to use try_into_dynamic(...) to get a dynamic image to use with the image crate. While try_into_dynamic is public, it returns a Result<DynamicImage, IntoDynamicImageError>, and IntoDynamicImageError is not re_exported publicly. Though declared public, it's defined in image_texture_conversion.rs which is of pub(crate) visibility.
I can still use .unwrap() or .expect() or match ..., but I can't implement .from(...) for another error type, such as a thiserror style error.
What solution would you like?
Please re-export IntoDynamicImageError as public.
What alternative(s) have you considered?
For now I'm using match to decompose the error, printing using the error!(...) macro, and explicitly returning my own error variant.
Additional context
Hopefully it's something small!
The text was updated successfully, but these errors were encountered: