Rename buffer_source_type to buffer_source (#31426)

* Rename buffer_source_type to buffer_source

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* Code format

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

---------

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
This commit is contained in:
Taym Haddadi 2024-02-26 15:21:46 +01:00 committed by GitHub
parent ef8a0b7f7b
commit a9a7e8a5cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 22 additions and 23 deletions

View file

@ -14,7 +14,7 @@ use js::rust::HandleObject;
use js::typedarray::{ClampedU8, CreateWith, Uint8ClampedArray};
use super::bindings::buffer_source::{
new_initialized_heap_buffer_source_types, BufferSource, HeapBufferSource, HeapTypedArrayInit,
new_initialized_heap_buffer_source, BufferSource, HeapBufferSource, HeapTypedArrayInit,
};
use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::ImageDataMethods;
use crate::dom::bindings::error::{Error, Fallible};
@ -63,7 +63,7 @@ impl ImageData {
opt_height: Option<u32>,
jsobject: *mut JSObject,
) -> Fallible<DomRoot<ImageData>> {
let heap_typed_array = match new_initialized_heap_buffer_source_types::<ClampedU8>(
let heap_typed_array = match new_initialized_heap_buffer_source::<ClampedU8>(
HeapTypedArrayInit::Buffer(BufferSource::Uint8ClampedArray(Heap::boxed(jsobject))),
) {
Ok(heap_typed_array) => heap_typed_array,
@ -117,7 +117,7 @@ impl ImageData {
let len = width * height * 4;
let heap_typed_array =
match new_initialized_heap_buffer_source_types::<ClampedU8>(HeapTypedArrayInit::Info {
match new_initialized_heap_buffer_source::<ClampedU8>(HeapTypedArrayInit::Info {
len,
cx,
}) {