changed match to 'matches!' (#31850)

This commit is contained in:
Aarya Khandelwal 2024-03-25 16:58:12 +05:30 committed by GitHub
parent 9a76dd9325
commit bd39e03eeb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 185 additions and 229 deletions

View file

@ -74,10 +74,9 @@ impl GPUQueueMethods for GPUQueue {
/// <https://gpuweb.github.io/gpuweb/#dom-gpuqueue-submit>
fn Submit(&self, command_buffers: Vec<DomRoot<GPUCommandBuffer>>) {
let valid = command_buffers.iter().all(|cb| {
cb.buffers().iter().all(|b| match b.state() {
GPUBufferState::Unmapped => true,
_ => false,
})
cb.buffers()
.iter()
.all(|b| matches!(b.state(), GPUBufferState::Unmapped))
});
let scope_id = self.device.borrow().as_ref().unwrap().use_current_scope();
if !valid {