NonZero internal Id representation#546
Conversation
grovesNL
left a comment
There was a problem hiding this comment.
Looks great once we can get cbindgen working with this 👍
| let color_attachments = targets.colors | ||
| .iter() | ||
| .take_while(|at| at.attachment != id::TextureViewId::ERROR) | ||
| .take_while(|at| at.attachment != 0) |
There was a problem hiding this comment.
Although it probably won't happen often, it might still be nice to have associated constants for const ERROR: u64 = 0u64 on Id instead of comparing against 0
There was a problem hiding this comment.
But the whole point here is that you can't have ERROR associated constant like this, since Id can't be that value ever :)
There was a problem hiding this comment.
Oh ok sounds good, I thought we were accepting an externally provided u64 here and trying to check if it's None
There was a problem hiding this comment.
oh wait, you wrote ERROR: u64. Yes, sure, we could have such a constant, maybe under a different name.
There was a problem hiding this comment.
Yeah, maybe NONE: u64 or something
0e24615 to
69e3634
Compare
|
bors r=grovesNL |
Build failed |
|
Good thing we have unit tests! :) |
Build succeeded |
Fixes #544
Based on #545
Blocked by mozilla/cbindgen#500