aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bluetoothuuid.rs
diff options
context:
space:
mode:
authorfokinv <fokinvalen@gmail.com>2016-04-15 15:32:13 +0200
committerAttila Dusnoki <dati91@gmail.com>2016-05-03 11:35:28 +0200
commitf47f8d1a5cf26613082a97e6ad84e27674fd5f27 (patch)
tree2393bd11193fa5b6e52874b09d12a021239c5a1a /components/script/dom/bluetoothuuid.rs
parent27ad1437a1af0b784a0c6dde91a936e6f55d0782 (diff)
downloadservo-f47f8d1a5cf26613082a97e6ad84e27674fd5f27.tar.gz
servo-f47f8d1a5cf26613082a97e6ad84e27674fd5f27.zip
Style fix
Diffstat (limited to 'components/script/dom/bluetoothuuid.rs')
-rw-r--r--components/script/dom/bluetoothuuid.rs17
1 files changed, 5 insertions, 12 deletions
diff --git a/components/script/dom/bluetoothuuid.rs b/components/script/dom/bluetoothuuid.rs
index 91c581d5d3b..e916c6ebded 100644
--- a/components/script/dom/bluetoothuuid.rs
+++ b/components/script/dom/bluetoothuuid.rs
@@ -274,9 +274,7 @@ impl BluetoothUUID {
}
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothuuid-getservice
- pub fn GetService(globalref: GlobalRef,
- name: StringOrUnsignedLong)
- -> Fallible<UUID> {
+ pub fn GetService(globalref: GlobalRef, name: StringOrUnsignedLong) -> Fallible<UUID> {
BluetoothUUID::resolve_uuid_name(globalref,
name,
BLUETOOTH_ASSIGNED_SERVICES,
@@ -284,9 +282,7 @@ impl BluetoothUUID {
}
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothuuid-getcharacteristic
- pub fn GetCharacteristic(globalref: GlobalRef,
- name: StringOrUnsignedLong)
- -> Fallible<UUID> {
+ pub fn GetCharacteristic(globalref: GlobalRef, name: StringOrUnsignedLong) -> Fallible<UUID> {
BluetoothUUID::resolve_uuid_name(globalref,
name,
BLUETOOTH_ASSIGNED_CHARCTERISTICS,
@@ -294,9 +290,7 @@ impl BluetoothUUID {
}
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothuuid-getdescriptor
- pub fn GetDescriptor(globalref: GlobalRef,
- name: StringOrUnsignedLong)
- -> Fallible<UUID> {
+ pub fn GetDescriptor(globalref: GlobalRef, name: StringOrUnsignedLong) -> Fallible<UUID> {
BluetoothUUID::resolve_uuid_name(globalref,
name,
BLUETOOTH_ASSIGNED_DESCRIPTORS,
@@ -311,7 +305,7 @@ impl BluetoothUUID {
-> Fallible<DOMString> {
match name {
// Step 1
- StringOrUnsignedLong::UnsignedLong(unsigned32) =>{
+ StringOrUnsignedLong::UnsignedLong(unsigned32) => {
Ok(BluetoothUUID::CanonicalUUID(globalref, unsigned32))
},
StringOrUnsignedLong::String(dstring) => {
@@ -322,8 +316,7 @@ impl BluetoothUUID {
} else {
// Step 3
let concatenated = format!("{}.{}", prefix, dstring);
- let is_in_table = assigned_numbers_table.iter()
- .find(|p| p.0 == concatenated);
+ let is_in_table = assigned_numbers_table.iter().find(|p| p.0 == concatenated);
match is_in_table {
Some(&(_, alias)) => Ok(BluetoothUUID::CanonicalUUID(globalref, alias)),
None => Err(Syntax),