Move convert_label to Into implementation (#33348)

Signed-off-by: Taym <haddadi.taym@gmail.com>
This commit is contained in:
Taym Haddadi 2024-09-06 23:58:13 +02:00 committed by GitHub
parent bc04f94a30
commit 152e62022a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 23 additions and 31 deletions

View file

@ -16,7 +16,6 @@ use super::bindings::buffer_source::DataBlock;
use super::bindings::codegen::Bindings::WebGPUBinding::{
GPUBufferDescriptor, GPUBufferMapState, GPUFlagsConstant, GPUMapModeFlags,
};
use super::gpuconvert::convert_label;
use crate::dom::bindings::cell::DomRefCell;
use crate::dom::bindings::codegen::Bindings::WebGPUBinding::{
GPUBufferMethods, GPUMapModeConstants, GPUSize64,
@ -138,7 +137,7 @@ impl GPUBuffer {
descriptor: &GPUBufferDescriptor,
) -> Fallible<DomRoot<GPUBuffer>> {
let desc = wgt::BufferDescriptor {
label: convert_label(&descriptor.parent),
label: (&descriptor.parent).into(),
size: descriptor.size as wgt::BufferAddress,
usage: wgt::BufferUsages::from_bits_retain(descriptor.usage),
mapped_at_creation: descriptor.mappedAtCreation,