-
Notifications
You must be signed in to change notification settings - Fork 466
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
A preview of the don't panic branch #701
base: master
Are you sure you want to change the base?
Conversation
This required also updating code in render and surface. Update surrounding code to prefer bail! over explicit Err.
Curently, TryFrom is unstable only so I put a custom try_from method on the Impl for PixelFormatEnum.
Looks great to me! I would have preferred some of these changes to be in separate PRs though, for instance the changes to From this results in PRs where a big feature emerges, but some "by the way" breaking changes happen as well. It also becomes hard to write the changelog when changes like that are added sneakily in PRs. Concerning this PR itself, I've only looked at it very quickly but it looks like you made most of the results I don't plan to merge this into master just yet, if I will be merging this, that will be into another branch entirely, which will be dedicated to rust-sdl2 1.0.0-alpha. That means that this feature will probably not be out publicly until 1.0.0; when 1.0.0 we will ready and we will abandon support for the pre-1.0 releases, then I'll merge this into master. Quick question, you added some |
Okay. It shouldn't be too hard to separate that out. Anything else you want me to pull out?
Right. I tried to allude to that in my blurb. I 100% agree that
At the moment, since I don't properly use This was really meant as a preview so that we could get on the same page about the changes as a whole. Thanks for your feedback! |
Did you abandon this feature in the end? |
No. I've just been keeping busy with other things. It sounded like these
changes wouldn't be merged until a long ways off version so I haven't made
it a priority lately.
…On Tue, Oct 31, 2017 at 00:23 Cobrand ***@***.***> wrote:
Did you abandon this feature in the end?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#701 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAXefWQj-LVR61-oBWwL3fa2pvnsdqRJks5sxsrZgaJpZM4PMTZ5>
.
|
Please Do NOT merge this yet!
I wanted to give you a heads up about some of the changes I want to make. So far I've been pretty aggressive about looking for calls to
panic!
and replacing them withbail!
from theerror_chain
crate. At the moment that's just sugar forreturn Err(...)
. I have yet to start using any real features of theerror_chain
crate. I'm saving that for a later refactor.After I get rid of the
panic
s, I know I need to look for other forms of panic such asunwrap()
.I'm interested in any feedback you have about these changes. Things you want me to change. Changes you don't want me to make, etc.
My reason for being pretty aggressive about getting rid of
panic
is that if the C code could return an error then it would be nice to get a chance to handle that on the Rust side even if it makes the API seem less elegant.Thanks!