mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 08:13:27 +00:00
remove unused BufferTracker.get()
This commit is contained in:
parent
152a7e7dd0
commit
ac88c738c0
@ -492,21 +492,6 @@ impl<A: HalApi> BufferTracker<A> {
|
||||
unsafe { scope.metadata.remove(index) };
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn get(&self, index: TrackerIndex) -> Option<&Arc<Buffer<A>>> {
|
||||
let index = index.as_usize();
|
||||
if index > self.metadata.size() {
|
||||
return None;
|
||||
}
|
||||
self.tracker_assert_in_bounds(index);
|
||||
unsafe {
|
||||
if self.metadata.contains_unchecked(index) {
|
||||
return Some(self.metadata.get_resource_unchecked(index));
|
||||
}
|
||||
}
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
/// Source of Buffer State.
|
||||
|
Loading…
Reference in New Issue
Block a user