mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
[naga] Use Range::from_index_range in Arena::range_from.
Use the associated function `Range::from_index_range` to construct the return value of `Arena::range_from`, rather than constructing the `Range` directly, in preparation for those fields becoming private.
This commit is contained in:
@@ -378,10 +378,8 @@ impl<T> Arena<T> {
|
||||
|
||||
/// Get the range of handles from a particular number of elements to the end.
|
||||
pub fn range_from(&self, old_length: usize) -> Range<T> {
|
||||
Range {
|
||||
inner: old_length as u32..self.data.len() as u32,
|
||||
marker: PhantomData,
|
||||
}
|
||||
let range = old_length as u32..self.data.len() as u32;
|
||||
Range::from_index_range(range, self)
|
||||
}
|
||||
|
||||
/// Clears the arena keeping all allocations
|
||||
|
||||
Reference in New Issue
Block a user