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

Conversion from PixelFormatEnum to PixelFormat #898

Merged
merged 2 commits into from
Jun 8, 2019
Merged

Conversion from PixelFormatEnum to PixelFormat #898

merged 2 commits into from
Jun 8, 2019

Conversation

edhebi
Copy link
Contributor

@edhebi edhebi commented Jun 8, 2019

see issue #840

This commit implements the TryFrom<PixelFormatEnum> trait for PixelFormat.

There isn't any test yet, since I wasn't sure wich way you would like to go about it

@edhebi edhebi marked this pull request as ready for review June 8, 2019 15:37
@edhebi
Copy link
Contributor Author

edhebi commented Jun 8, 2019

Note: We can't realy use basic From here since returned pointer can be null. Possible causes I can think of are out of memory and invalid enum to begin with, but there mght be other ones

@Cobrand Cobrand merged commit 120d544 into Rust-SDL2:master Jun 8, 2019
@Cobrand
Copy link
Member

Cobrand commented Jun 8, 2019

Thanks!

sypwex pushed a commit to sypwex/rust-sdl2 that referenced this pull request Jun 2, 2024
…rmatenum

Conversion from PixelFormatEnum to PixelFormat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants