From 5fa54177cafdfd321972d3050f8979e6a4f81592 Mon Sep 17 00:00:00 2001 From: Arthur Marble Date: Sun, 18 Sep 2016 00:07:32 -0500 Subject: [PATCH] Refactored a bluetooth* related files from codeStyle to code_style. --- .../dom/bluetoothcharacteristicproperties.rs | 24 +++++++++---------- components/script/dom/bluetoothdevice.rs | 8 +++---- .../dom/bluetoothremotegattcharacteristic.rs | 8 +++---- .../dom/bluetoothremotegattdescriptor.rs | 8 +++---- .../script/dom/bluetoothremotegattservice.rs | 16 ++++++------- 5 files changed, 32 insertions(+), 32 deletions(-) diff --git a/components/script/dom/bluetoothcharacteristicproperties.rs b/components/script/dom/bluetoothcharacteristicproperties.rs index 6a0fb26c0b3..fd716d72bb5 100644 --- a/components/script/dom/bluetoothcharacteristicproperties.rs +++ b/components/script/dom/bluetoothcharacteristicproperties.rs @@ -19,9 +19,9 @@ pub struct BluetoothCharacteristicProperties { write: bool, notify: bool, indicate: bool, - authenticatedSignedWrites: bool, - reliableWrite: bool, - writableAuxiliaries: bool, + authenticated_signed_writes: bool, + reliable_write: bool, + writable_auxiliaries: bool, } impl BluetoothCharacteristicProperties { @@ -31,9 +31,9 @@ impl BluetoothCharacteristicProperties { write: bool, notify: bool, indicate: bool, - authenticatedSignedWrites: bool, - reliableWrite: bool, - writableAuxiliaries: bool) + authenticated_signed_writes: bool, + reliable_write: bool, + writable_auxiliaries: bool) -> BluetoothCharacteristicProperties { BluetoothCharacteristicProperties { reflector_: Reflector::new(), @@ -43,9 +43,9 @@ impl BluetoothCharacteristicProperties { write: write, notify: notify, indicate: indicate, - authenticatedSignedWrites: authenticatedSignedWrites, - reliableWrite: reliableWrite, - writableAuxiliaries: writableAuxiliaries, + authenticated_signed_writes: authenticated_signed_writes, + reliable_write: reliable_write, + writable_auxiliaries: writable_auxiliaries, } } @@ -107,16 +107,16 @@ impl BluetoothCharacteristicPropertiesMethods for BluetoothCharacteristicPropert // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothcharacteristicproperties-authenticatedsignedwrites fn AuthenticatedSignedWrites(&self) -> bool { - self.authenticatedSignedWrites + self.authenticated_signed_writes } // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothcharacteristicproperties-reliablewrite fn ReliableWrite(&self) -> bool { - self.reliableWrite + self.reliable_write } // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothcharacteristicproperties-writableauxiliaries fn WritableAuxiliaries(&self) -> bool { - self.writableAuxiliaries + self.writable_auxiliaries } } diff --git a/components/script/dom/bluetoothdevice.rs b/components/script/dom/bluetoothdevice.rs index d82901b03de..1508c0382c8 100644 --- a/components/script/dom/bluetoothdevice.rs +++ b/components/script/dom/bluetoothdevice.rs @@ -17,20 +17,20 @@ pub struct BluetoothDevice { reflector_: Reflector, id: DOMString, name: Option, - adData: MutHeap>, + ad_data: MutHeap>, gatt: MutNullableHeap>, } impl BluetoothDevice { pub fn new_inherited(id: DOMString, name: Option, - adData: &BluetoothAdvertisingData) + ad_data: &BluetoothAdvertisingData) -> BluetoothDevice { BluetoothDevice { reflector_: Reflector::new(), id: id, name: name, - adData: MutHeap::new(adData), + ad_data: MutHeap::new(ad_data), gatt: Default::default(), } } @@ -61,7 +61,7 @@ impl BluetoothDeviceMethods for BluetoothDevice { // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothdevice-addata fn AdData(&self) -> Root { - self.adData.get() + self.ad_data.get() } // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothdevice-gatt diff --git a/components/script/dom/bluetoothremotegattcharacteristic.rs b/components/script/dom/bluetoothremotegattcharacteristic.rs index c88463920e6..15ca7af2235 100644 --- a/components/script/dom/bluetoothremotegattcharacteristic.rs +++ b/components/script/dom/bluetoothremotegattcharacteristic.rs @@ -37,14 +37,14 @@ pub struct BluetoothRemoteGATTCharacteristic { uuid: DOMString, properties: MutHeap>, value: DOMRefCell>, - instanceID: String, + instance_id: String, } impl BluetoothRemoteGATTCharacteristic { pub fn new_inherited(service: &BluetoothRemoteGATTService, uuid: DOMString, properties: &BluetoothCharacteristicProperties, - instanceID: String) + instance_id: String) -> BluetoothRemoteGATTCharacteristic { BluetoothRemoteGATTCharacteristic { reflector_: Reflector::new(), @@ -52,7 +52,7 @@ impl BluetoothRemoteGATTCharacteristic { uuid: uuid, properties: MutHeap::new(properties), value: DOMRefCell::new(None), - instanceID: instanceID, + instance_id: instance_id, } } @@ -77,7 +77,7 @@ impl BluetoothRemoteGATTCharacteristic { } fn get_instance_id(&self) -> String { - self.instanceID.clone() + self.instance_id.clone() } } diff --git a/components/script/dom/bluetoothremotegattdescriptor.rs b/components/script/dom/bluetoothremotegattdescriptor.rs index a726de42974..99065a9aec0 100644 --- a/components/script/dom/bluetoothremotegattdescriptor.rs +++ b/components/script/dom/bluetoothremotegattdescriptor.rs @@ -28,20 +28,20 @@ pub struct BluetoothRemoteGATTDescriptor { characteristic: MutHeap>, uuid: DOMString, value: DOMRefCell>, - instanceID: String, + instance_id: String, } impl BluetoothRemoteGATTDescriptor { pub fn new_inherited(characteristic: &BluetoothRemoteGATTCharacteristic, uuid: DOMString, - instanceID: String) + instance_id: String) -> BluetoothRemoteGATTDescriptor { BluetoothRemoteGATTDescriptor { reflector_: Reflector::new(), characteristic: MutHeap::new(characteristic), uuid: uuid, value: DOMRefCell::new(None), - instanceID: instanceID, + instance_id: instance_id, } } @@ -64,7 +64,7 @@ impl BluetoothRemoteGATTDescriptor { } fn get_instance_id(&self) -> String { - self.instanceID.clone() + self.instance_id.clone() } } diff --git a/components/script/dom/bluetoothremotegattservice.rs b/components/script/dom/bluetoothremotegattservice.rs index 5b80bc6afc0..a39bb4fdfd5 100644 --- a/components/script/dom/bluetoothremotegattservice.rs +++ b/components/script/dom/bluetoothremotegattservice.rs @@ -24,22 +24,22 @@ pub struct BluetoothRemoteGATTService { reflector_: Reflector, device: MutHeap>, uuid: DOMString, - isPrimary: bool, - instanceID: String, + is_primary: bool, + instance_id: String, } impl BluetoothRemoteGATTService { pub fn new_inherited(device: &BluetoothDevice, uuid: DOMString, - isPrimary: bool, - instanceID: String) + is_primary: bool, + instance_id: String) -> BluetoothRemoteGATTService { BluetoothRemoteGATTService { reflector_: Reflector::new(), device: MutHeap::new(device), uuid: uuid, - isPrimary: isPrimary, - instanceID: instanceID, + is_primary: is_primary, + instance_id: instance_id, } } @@ -64,7 +64,7 @@ impl BluetoothRemoteGATTService { } fn get_instance_id(&self) -> String { - self.instanceID.clone() + self.instance_id.clone() } } @@ -76,7 +76,7 @@ impl BluetoothRemoteGATTServiceMethods for BluetoothRemoteGATTService { // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattservice-isprimary fn IsPrimary(&self) -> bool { - self.isPrimary + self.is_primary } // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattservice-uuid