Skip to content

Commit

Permalink
transition away from deprecated setters internally (#4297)
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanderc authored Nov 29, 2024
1 parent 2fbee99 commit b3da9dc
Show file tree
Hide file tree
Showing 186 changed files with 346 additions and 345 deletions.
4 changes: 2 additions & 2 deletions crates/web-sys/src/features/gen_AesCbcParams.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ impl AesCbcParams {
pub fn new(name: &str, iv: &::js_sys::Object) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.name(name);
ret.iv(iv);
ret.set_name(name);
ret.set_iv(iv);
ret
}
#[deprecated = "Use `set_name()` instead."]
Expand Down
6 changes: 3 additions & 3 deletions crates/web-sys/src/features/gen_AesCtrParams.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ impl AesCtrParams {
pub fn new(name: &str, counter: &::js_sys::Object, length: u8) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.name(name);
ret.counter(counter);
ret.length(length);
ret.set_name(name);
ret.set_counter(counter);
ret.set_length(length);
ret
}
#[deprecated = "Use `set_name()` instead."]
Expand Down
4 changes: 2 additions & 2 deletions crates/web-sys/src/features/gen_AesDerivedKeyParams.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ impl AesDerivedKeyParams {
pub fn new(name: &str, length: u32) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.name(name);
ret.length(length);
ret.set_name(name);
ret.set_length(length);
ret
}
#[deprecated = "Use `set_name()` instead."]
Expand Down
4 changes: 2 additions & 2 deletions crates/web-sys/src/features/gen_AesGcmParams.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ impl AesGcmParams {
pub fn new(name: &str, iv: &::js_sys::Object) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.name(name);
ret.iv(iv);
ret.set_name(name);
ret.set_iv(iv);
ret
}
#[deprecated = "Use `set_name()` instead."]
Expand Down
4 changes: 2 additions & 2 deletions crates/web-sys/src/features/gen_AesKeyAlgorithm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ impl AesKeyAlgorithm {
pub fn new(name: &str, length: u16) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.name(name);
ret.length(length);
ret.set_name(name);
ret.set_length(length);
ret
}
#[deprecated = "Use `set_name()` instead."]
Expand Down
4 changes: 2 additions & 2 deletions crates/web-sys/src/features/gen_AesKeyGenParams.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ impl AesKeyGenParams {
pub fn new(name: &str, length: u16) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.name(name);
ret.length(length);
ret.set_name(name);
ret.set_length(length);
ret
}
#[deprecated = "Use `set_name()` instead."]
Expand Down
2 changes: 1 addition & 1 deletion crates/web-sys/src/features/gen_Algorithm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ impl Algorithm {
pub fn new(name: &str) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.name(name);
ret.set_name(name);
ret
}
#[deprecated = "Use `set_name()` instead."]
Expand Down
6 changes: 3 additions & 3 deletions crates/web-sys/src/features/gen_AllowedBluetoothDevice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ impl AllowedBluetoothDevice {
) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.allowed_services(allowed_services);
ret.device_id(device_id);
ret.may_use_gatt(may_use_gatt);
ret.set_allowed_services(allowed_services);
ret.set_device_id(device_id);
ret.set_may_use_gatt(may_use_gatt);
ret
}
#[cfg(web_sys_unstable_apis)]
Expand Down
4 changes: 2 additions & 2 deletions crates/web-sys/src/features/gen_AllowedUsbDevice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ impl AllowedUsbDevice {
pub fn new(product_id: u8, vendor_id: u8) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.product_id(product_id);
ret.vendor_id(vendor_id);
ret.set_product_id(product_id);
ret.set_vendor_id(vendor_id);
ret
}
#[cfg(web_sys_unstable_apis)]
Expand Down
6 changes: 3 additions & 3 deletions crates/web-sys/src/features/gen_AnimationPropertyDetails.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ impl AnimationPropertyDetails {
) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.property(property);
ret.running_on_compositor(running_on_compositor);
ret.values(values);
ret.set_property(property);
ret.set_running_on_compositor(running_on_compositor);
ret.set_values(values);
ret
}
#[deprecated = "Use `set_property()` instead."]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ impl AnimationPropertyValueDetails {
pub fn new(composite: CompositeOperation, offset: f64) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.composite(composite);
ret.offset(offset);
ret.set_composite(composite);
ret.set_offset(offset);
ret
}
#[cfg(feature = "CompositeOperation")]
Expand Down
4 changes: 2 additions & 2 deletions crates/web-sys/src/features/gen_AttributeNameValue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ impl AttributeNameValue {
pub fn new(name: &str, value: &str) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.name(name);
ret.value(value);
ret.set_name(name);
ret.set_value(value);
ret
}
#[deprecated = "Use `set_name()` instead."]
Expand Down
4 changes: 2 additions & 2 deletions crates/web-sys/src/features/gen_AudioBufferOptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ impl AudioBufferOptions {
pub fn new(length: u32, sample_rate: f32) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.length(length);
ret.sample_rate(sample_rate);
ret.set_length(length);
ret.set_sample_rate(sample_rate);
ret
}
#[deprecated = "Use `set_length()` instead."]
Expand Down
2 changes: 1 addition & 1 deletion crates/web-sys/src/features/gen_AudioDataCopyToOptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ impl AudioDataCopyToOptions {
pub fn new(plane_index: u32) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.plane_index(plane_index);
ret.set_plane_index(plane_index);
ret
}
#[cfg(web_sys_unstable_apis)]
Expand Down
12 changes: 6 additions & 6 deletions crates/web-sys/src/features/gen_AudioDataInit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,12 @@ impl AudioDataInit {
) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.data(data);
ret.format(format);
ret.number_of_channels(number_of_channels);
ret.number_of_frames(number_of_frames);
ret.sample_rate(sample_rate);
ret.timestamp(timestamp);
ret.set_data(data);
ret.set_format(format);
ret.set_number_of_channels(number_of_channels);
ret.set_number_of_frames(number_of_frames);
ret.set_sample_rate(sample_rate);
ret.set_timestamp(timestamp);
ret
}
#[cfg(web_sys_unstable_apis)]
Expand Down
6 changes: 3 additions & 3 deletions crates/web-sys/src/features/gen_AudioDecoderConfig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ impl AudioDecoderConfig {
pub fn new(codec: &str, number_of_channels: u32, sample_rate: u32) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.codec(codec);
ret.number_of_channels(number_of_channels);
ret.sample_rate(sample_rate);
ret.set_codec(codec);
ret.set_number_of_channels(number_of_channels);
ret.set_sample_rate(sample_rate);
ret
}
#[cfg(web_sys_unstable_apis)]
Expand Down
4 changes: 2 additions & 2 deletions crates/web-sys/src/features/gen_AudioDecoderInit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ impl AudioDecoderInit {
pub fn new(error: &::js_sys::Function, output: &::js_sys::Function) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.error(error);
ret.output(output);
ret.set_error(error);
ret.set_output(output);
ret
}
#[cfg(web_sys_unstable_apis)]
Expand Down
2 changes: 1 addition & 1 deletion crates/web-sys/src/features/gen_AudioEncoderConfig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl AudioEncoderConfig {
pub fn new(codec: &str) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.codec(codec);
ret.set_codec(codec);
ret
}
#[cfg(web_sys_unstable_apis)]
Expand Down
4 changes: 2 additions & 2 deletions crates/web-sys/src/features/gen_AudioEncoderInit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ impl AudioEncoderInit {
pub fn new(error: &::js_sys::Function, output: &::js_sys::Function) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.error(error);
ret.output(output);
ret.set_error(error);
ret.set_output(output);
ret
}
#[cfg(web_sys_unstable_apis)]
Expand Down
2 changes: 1 addition & 1 deletion crates/web-sys/src/features/gen_AudioSinkOptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl AudioSinkOptions {
pub fn new(type_: AudioSinkType) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.type_(type_);
ret.set_type(type_);
ret
}
#[cfg(web_sys_unstable_apis)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl AuthenticationExtensionsPrfValues {
pub fn new(first: &::js_sys::Object) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.first(first);
ret.set_first(first);
ret
}
#[cfg(web_sys_unstable_apis)]
Expand Down
10 changes: 5 additions & 5 deletions crates/web-sys/src/features/gen_AuthenticationResponseJson.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,11 @@ impl AuthenticationResponseJson {
) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.client_extension_results(client_extension_results);
ret.id(id);
ret.raw_id(raw_id);
ret.response(response);
ret.type_(type_);
ret.set_client_extension_results(client_extension_results);
ret.set_id(id);
ret.set_raw_id(raw_id);
ret.set_response(response);
ret.set_type(type_);
ret
}
#[cfg(web_sys_unstable_apis)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ impl AuthenticatorAssertionResponseJson {
pub fn new(authenticator_data: &str, client_data_json: &str, signature: &str) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.authenticator_data(authenticator_data);
ret.client_data_json(client_data_json);
ret.signature(signature);
ret.set_authenticator_data(authenticator_data);
ret.set_client_data_json(client_data_json);
ret.set_signature(signature);
ret
}
#[cfg(web_sys_unstable_apis)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,11 @@ impl AuthenticatorAttestationResponseJson {
) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.attestation_object(attestation_object);
ret.authenticator_data(authenticator_data);
ret.client_data_json(client_data_json);
ret.public_key_algorithm(public_key_algorithm);
ret.transports(transports);
ret.set_attestation_object(attestation_object);
ret.set_authenticator_data(authenticator_data);
ret.set_client_data_json(client_data_json);
ret.set_public_key_algorithm(public_key_algorithm);
ret.set_transports(transports);
ret
}
#[cfg(web_sys_unstable_apis)]
Expand Down
2 changes: 1 addition & 1 deletion crates/web-sys/src/features/gen_BasicCardResponse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl BasicCardResponse {
pub fn new(card_number: &str) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.card_number(card_number);
ret.set_card_number(card_number);
ret
}
#[cfg(feature = "PaymentAddress")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ impl BluetoothAdvertisingEventInit {
pub fn new(device: &BluetoothDevice) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.device(device);
ret.set_device(device);
ret
}
#[cfg(web_sys_unstable_apis)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ impl BluetoothPermissionDescriptor {
pub fn new(name: PermissionName) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.name(name);
ret.set_name(name);
ret
}
#[cfg(web_sys_unstable_apis)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ impl BluetoothPermissionStorage {
pub fn new(allowed_devices: &::wasm_bindgen::JsValue) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.allowed_devices(allowed_devices);
ret.set_allowed_devices(allowed_devices);
ret
}
#[cfg(web_sys_unstable_apis)]
Expand Down
4 changes: 2 additions & 2 deletions crates/web-sys/src/features/gen_ClientRectsAndTexts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ impl ClientRectsAndTexts {
pub fn new(rect_list: &DomRectList, text_list: &::wasm_bindgen::JsValue) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.rect_list(rect_list);
ret.text_list(text_list);
ret.set_rect_list(rect_list);
ret.set_text_list(text_list);
ret
}
#[cfg(feature = "DomRectList")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl ClipboardPermissionDescriptor {
pub fn new(name: PermissionName) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.name(name);
ret.set_name(name);
ret
}
#[cfg(web_sys_unstable_apis)]
Expand Down
8 changes: 4 additions & 4 deletions crates/web-sys/src/features/gen_CollectedClientData.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ impl CollectedClientData {
pub fn new(challenge: &str, hash_algorithm: &str, origin: &str, type_: &str) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.challenge(challenge);
ret.hash_algorithm(hash_algorithm);
ret.origin(origin);
ret.type_(type_);
ret.set_challenge(challenge);
ret.set_hash_algorithm(hash_algorithm);
ret.set_origin(origin);
ret.set_type(type_);
ret
}
#[deprecated = "Use `set_challenge()` instead."]
Expand Down
4 changes: 2 additions & 2 deletions crates/web-sys/src/features/gen_CryptoKeyPair.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ impl CryptoKeyPair {
pub fn new(private_key: &CryptoKey, public_key: &CryptoKey) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.private_key(private_key);
ret.public_key(public_key);
ret.set_private_key(private_key);
ret.set_public_key(public_key);
ret
}
#[cfg(feature = "CryptoKey")]
Expand Down
6 changes: 3 additions & 3 deletions crates/web-sys/src/features/gen_DecoderDoctorNotification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ impl DecoderDoctorNotification {
) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.decoder_doctor_report_id(decoder_doctor_report_id);
ret.is_solved(is_solved);
ret.type_(type_);
ret.set_decoder_doctor_report_id(decoder_doctor_report_id);
ret.set_is_solved(is_solved);
ret.set_type(type_);
ret
}
#[deprecated = "Use `set_decode_issue()` instead."]
Expand Down
4 changes: 2 additions & 2 deletions crates/web-sys/src/features/gen_DhKeyDeriveParams.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ impl DhKeyDeriveParams {
pub fn new(name: &str, public: &CryptoKey) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.name(name);
ret.public(public);
ret.set_name(name);
ret.set_public(public);
ret
}
#[deprecated = "Use `set_name()` instead."]
Expand Down
Loading

0 comments on commit b3da9dc

Please sign in to comment.