aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/gpuqueue.rs
diff options
context:
space:
mode:
authorAarya Khandelwal <119049564+Aaryakhandelwal@users.noreply.github.com>2024-03-25 16:58:12 +0530
committerGitHub <noreply@github.com>2024-03-25 11:28:12 +0000
commitbd39e03eeb3d369e8189135326c733bbe5a3bb10 (patch)
tree32bb57b214bed8890d359701ef326f7231255eff /components/script/dom/gpuqueue.rs
parent9a76dd9325794346163e858831abb97de4b41e41 (diff)
downloadservo-bd39e03eeb3d369e8189135326c733bbe5a3bb10.tar.gz
servo-bd39e03eeb3d369e8189135326c733bbe5a3bb10.zip
changed `match` to 'matches!' (#31850)
Diffstat (limited to 'components/script/dom/gpuqueue.rs')
-rw-r--r--components/script/dom/gpuqueue.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/components/script/dom/gpuqueue.rs b/components/script/dom/gpuqueue.rs
index de8766c3365..3acecce9c3e 100644
--- a/components/script/dom/gpuqueue.rs
+++ b/components/script/dom/gpuqueue.rs
@@ -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 {