diff options
author | zakorgy <zakorgy@inf.u-szeged.hu> | 2016-04-22 12:49:38 +0200 |
---|---|---|
committer | Attila Dusnoki <dati91@gmail.com> | 2016-05-03 11:35:30 +0200 |
commit | 402bc552cae3840993e10def211c16440e5bc005 (patch) | |
tree | b0ffa93c4a955f583810df2f9e6d4f6a269db11c /components/script/dom/bluetoothuuid.rs | |
parent | 76d6685d7f982bef2642a6356ecab358178d4184 (diff) | |
download | servo-402bc552cae3840993e10def211c16440e5bc005.tar.gz servo-402bc552cae3840993e10def211c16440e5bc005.zip |
Replace the union types with the correct typedefs in the webidl files and the API classes.
Diffstat (limited to 'components/script/dom/bluetoothuuid.rs')
-rw-r--r-- | components/script/dom/bluetoothuuid.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/components/script/dom/bluetoothuuid.rs b/components/script/dom/bluetoothuuid.rs index e916c6ebded..d4ed2b5e6a7 100644 --- a/components/script/dom/bluetoothuuid.rs +++ b/components/script/dom/bluetoothuuid.rs @@ -11,6 +11,9 @@ use regex::Regex; use util::str::DOMString; pub type UUID = DOMString; +pub type BluetoothServiceUUID = StringOrUnsignedLong; +pub type BluetoothCharacteristicUUID = StringOrUnsignedLong; +pub type BluetoothDescriptorUUID = StringOrUnsignedLong; // https://webbluetoothcg.github.io/web-bluetooth/#bluetoothuuid #[dom_struct] @@ -274,7 +277,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: BluetoothServiceUUID) -> Fallible<UUID> { BluetoothUUID::resolve_uuid_name(globalref, name, BLUETOOTH_ASSIGNED_SERVICES, @@ -282,7 +285,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: BluetoothCharacteristicUUID) -> Fallible<UUID> { BluetoothUUID::resolve_uuid_name(globalref, name, BLUETOOTH_ASSIGNED_CHARCTERISTICS, @@ -290,7 +293,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: BluetoothDescriptorUUID) -> Fallible<UUID> { BluetoothUUID::resolve_uuid_name(globalref, name, BLUETOOTH_ASSIGNED_DESCRIPTORS, |