mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
[naga] Use Handle::new, don't construct the Handle directly.
In preparation for making `Handle` fields private to another module, have the `Iterator` implementation for `arena::Range` call `Handle::new` to construct the handle being produced, rather than building it using a struct literal.
This commit is contained in:
@@ -185,10 +185,7 @@ impl<T> Iterator for Range<T> {
|
||||
if self.inner.start < self.inner.end {
|
||||
let next = self.inner.start;
|
||||
self.inner.start += 1;
|
||||
Some(Handle {
|
||||
index: NonMaxU32::new(next).unwrap(),
|
||||
marker: self.marker,
|
||||
})
|
||||
Some(Handle::new(NonMaxU32::new(next).unwrap()))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user