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

@ -9,7 +9,7 @@ use js::jsapi::JSObject;
use js::rust::HandleObject;
use js::typedarray::Uint8Array;
use crate::dom::bindings::buffer_source::create_buffer_source_types;
use crate::dom::bindings::buffer_source::create_buffer_source;
use crate::dom::bindings::codegen::Bindings::TextEncoderBinding::TextEncoderMethods;
use crate::dom::bindings::error::Fallible;
use crate::dom::bindings::reflector::{reflect_dom_object_with_proto, Reflector};
@ -55,7 +55,7 @@ impl TextEncoderMethods for TextEncoder {
let encoded = input.0.as_bytes();
rooted!(in(*cx) let mut js_object = ptr::null_mut::<JSObject>());
create_buffer_source_types(cx, &encoded, js_object.handle_mut())
create_buffer_source(cx, &encoded, js_object.handle_mut())
.expect("Converting input to uint8 array should never fail")
}
}