-
Notifications
You must be signed in to change notification settings - Fork 463
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
render.rs: refactor RendererInfo, add RendererFlags bitflags struct #1058
Conversation
Apologies for the duplicate commits. Feel free to squash these if/when merging |
I think there was a bit of a misunderstanding here, I thought you were only going to deprecate That brings me to the second point: |
If we don't add accessors, we have to change the type of the The point of deprecating direct access is that we future-proof ourselves for other changes to the internal structure. For example, if we decided to turn the texture_formats field into an array. |
So I had forgotten about That goes the same for If we ever change this field, we'll deprecate it then, but until then |
I've removed the deprecation attributes and getters for |
Thanks, but please use https://doc.rust-lang.org/std/num/struct.NonZeroU32.html#method.new instead of |
implementation of #1054
RendererInfo
RendererInfo
This will allow us to change the internal fields of
RendererInfo
in the future without forcing a breaking change, if we decide to remove direct field access entirelyRendererFlags
It is returned by the
RendererInfo::flags
methodThis represents a (minor) breaking change, since it adds deprecation lints, which may be errors if
#[forbid(deprecated)]
is usedI did not pull the last version change (0.34.4, from #1057), so there is a small merge conflict inCargo.toml