Skip to content

Commit

Permalink
Reference setters explicitly with Self:: in new to avoid ambiguit…
Browse files Browse the repository at this point in the history
…y with getter trait
  • Loading branch information
pablosichert committed Apr 24, 2024
1 parent 9aaac2b commit 128e678
Show file tree
Hide file tree
Showing 175 changed files with 313 additions and 313 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 @@ -47,8 +47,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);
Self::name(&mut ret, name);
Self::iv(&mut ret, iv);
ret
}
#[doc = "Change the `name` field of this object."]
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 @@ -58,9 +58,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);
Self::name(&mut ret, name);
Self::counter(&mut ret, counter);
Self::length(&mut ret, length);
ret
}
#[doc = "Change the `name` field of this object."]
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 @@ -47,8 +47,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);
Self::name(&mut ret, name);
Self::length(&mut ret, length);
ret
}
#[doc = "Change the `name` field of this object."]
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 @@ -69,8 +69,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);
Self::name(&mut ret, name);
Self::iv(&mut ret, iv);
ret
}
#[doc = "Change the `name` field of this object."]
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 @@ -47,8 +47,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);
Self::name(&mut ret, name);
Self::length(&mut ret, length);
ret
}
#[doc = "Change the `name` field of this object."]
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 @@ -47,8 +47,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);
Self::name(&mut ret, name);
Self::length(&mut ret, length);
ret
}
#[doc = "Change the `name` field of this object."]
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 @@ -36,7 +36,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);
Self::name(&mut ret, name);
ret
}
#[doc = "Change the `name` field of this object."]
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 @@ -87,9 +87,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);
Self::allowed_services(&mut ret, allowed_services);
Self::device_id(&mut ret, device_id);
Self::may_use_gatt(&mut ret, 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 @@ -83,8 +83,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);
Self::product_id(&mut ret, product_id);
Self::vendor_id(&mut ret, 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 @@ -73,9 +73,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);
Self::property(&mut ret, property);
Self::running_on_compositor(&mut ret, running_on_compositor);
Self::values(&mut ret, values);
ret
}
#[doc = "Change the `property` field of this object."]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,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);
Self::composite(&mut ret, composite);
Self::offset(&mut ret, 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 @@ -47,8 +47,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);
Self::name(&mut ret, name);
Self::value(&mut ret, value);
ret
}
#[doc = "Change the `name` field of this object."]
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 @@ -58,8 +58,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);
Self::length(&mut ret, length);
Self::sample_rate(&mut ret, sample_rate);
ret
}
#[doc = "Change the `length` field of this object."]
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 @@ -103,7 +103,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);
Self::plane_index(&mut ret, 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 @@ -143,12 +143,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);
Self::data(&mut ret, data);
Self::format(&mut ret, format);
Self::number_of_channels(&mut ret, number_of_channels);
Self::number_of_frames(&mut ret, number_of_frames);
Self::sample_rate(&mut ret, sample_rate);
Self::timestamp(&mut ret, 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 @@ -99,9 +99,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);
Self::codec(&mut ret, codec);
Self::number_of_channels(&mut ret, number_of_channels);
Self::sample_rate(&mut ret, 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 @@ -67,8 +67,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);
Self::error(&mut ret, error);
Self::output(&mut ret, 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 @@ -99,7 +99,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);
Self::codec(&mut ret, 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 @@ -67,8 +67,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);
Self::error(&mut ret, error);
Self::output(&mut ret, 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 @@ -56,7 +56,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_);
Self::type_(&mut ret, type_);
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 @@ -95,7 +95,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);
Self::card_number(&mut ret, card_number);
ret
}
#[cfg(feature = "PaymentAddress")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,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);
Self::device(&mut ret, device);
ret
}
#[cfg(web_sys_unstable_apis)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,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);
Self::name(&mut ret, name);
ret
}
#[cfg(web_sys_unstable_apis)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,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);
Self::allowed_devices(&mut ret, 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 @@ -52,8 +52,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);
Self::rect_list(&mut ret, rect_list);
Self::text_list(&mut ret, text_list);
ret
}
#[cfg(feature = "DomRectList")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,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);
Self::name(&mut ret, 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 @@ -98,10 +98,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_);
Self::challenge(&mut ret, challenge);
Self::hash_algorithm(&mut ret, hash_algorithm);
Self::origin(&mut ret, origin);
Self::type_(&mut ret, type_);
ret
}
#[doc = "Change the `challenge` field of this object."]
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 @@ -56,8 +56,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);
Self::private_key(&mut ret, private_key);
Self::public_key(&mut ret, 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 @@ -111,9 +111,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_);
Self::decoder_doctor_report_id(&mut ret, decoder_doctor_report_id);
Self::is_solved(&mut ret, is_solved);
Self::type_(&mut ret, type_);
ret
}
#[doc = "Change the `decodeIssue` field of this object."]
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 @@ -52,8 +52,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);
Self::name(&mut ret, name);
Self::public(&mut ret, public);
ret
}
#[doc = "Change the `name` field of this object."]
Expand Down
4 changes: 2 additions & 2 deletions crates/web-sys/src/features/gen_EcKeyAlgorithm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ impl EcKeyAlgorithm {
pub fn new(name: &str, named_curve: &str) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.name(name);
ret.named_curve(named_curve);
Self::name(&mut ret, name);
Self::named_curve(&mut ret, named_curve);
ret
}
#[doc = "Change the `name` field of this object."]
Expand Down
4 changes: 2 additions & 2 deletions crates/web-sys/src/features/gen_EcKeyGenParams.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ impl EcKeyGenParams {
pub fn new(name: &str, named_curve: &str) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.name(name);
ret.named_curve(named_curve);
Self::name(&mut ret, name);
Self::named_curve(&mut ret, named_curve);
ret
}
#[doc = "Change the `name` field of this object."]
Expand Down
2 changes: 1 addition & 1 deletion crates/web-sys/src/features/gen_EcKeyImportParams.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl EcKeyImportParams {
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);
Self::name(&mut ret, name);
ret
}
#[doc = "Change the `name` field of this object."]
Expand Down
4 changes: 2 additions & 2 deletions crates/web-sys/src/features/gen_EcdhKeyDeriveParams.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ impl EcdhKeyDeriveParams {
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);
Self::name(&mut ret, name);
Self::public(&mut ret, public);
ret
}
#[doc = "Change the `name` field of this object."]
Expand Down
4 changes: 2 additions & 2 deletions crates/web-sys/src/features/gen_EcdsaParams.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ impl EcdsaParams {
pub fn new(name: &str, hash: &::wasm_bindgen::JsValue) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.name(name);
ret.hash(hash);
Self::name(&mut ret, name);
Self::hash(&mut ret, hash);
ret
}
#[doc = "Change the `name` field of this object."]
Expand Down
6 changes: 3 additions & 3 deletions crates/web-sys/src/features/gen_EncodedAudioChunkInit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ impl EncodedAudioChunkInit {
pub fn new(data: &::js_sys::Object, timestamp: f64, type_: EncodedAudioChunkType) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.data(data);
ret.timestamp(timestamp);
ret.type_(type_);
Self::data(&mut ret, data);
Self::timestamp(&mut ret, timestamp);
Self::type_(&mut ret, type_);
ret
}
#[cfg(web_sys_unstable_apis)]
Expand Down

0 comments on commit 128e678

Please sign in to comment.