mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +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) };
|
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.
|
/// Source of Buffer State.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user