aboutsummaryrefslogtreecommitdiffstats
path: root/components/bluetooth/lib.rs
diff options
context:
space:
mode:
authorZakor Gyula <zakorgy@inf.u-szeged.hu>2017-02-09 17:32:01 +0100
committerAttila Dusnoki <dati91@users.noreply.github.com>2017-02-10 13:32:07 +0100
commitfae2beeda0b125547fb105017f77166dcf497a9f (patch)
treee8800d669abe3b47abbc7aa195d23d7a4f6d8aad /components/bluetooth/lib.rs
parent384391da680de3f73557dc721774326bbbf8ade7 (diff)
downloadservo-fae2beeda0b125547fb105017f77166dcf497a9f.tar.gz
servo-fae2beeda0b125547fb105017f77166dcf497a9f.zip
Reorder startNotifications steps
Diffstat (limited to 'components/bluetooth/lib.rs')
-rw-r--r--components/bluetooth/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/bluetooth/lib.rs b/components/bluetooth/lib.rs
index bcfa1b9c4dc..9091d8ebf35 100644
--- a/components/bluetooth/lib.rs
+++ b/components/bluetooth/lib.rs
@@ -886,7 +886,7 @@ impl BluetoothManager {
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattcharacteristic-startnotifications
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattcharacteristic-stopnotifications
fn enable_notification(&mut self, id: String, enable: bool) -> BluetoothResponseResult {
- // (StartNotifications) Step 2 - 3.
+ // (StartNotifications) Step 3 - 4.
// (StopNotifications) Step 1 - 2.
if !self.characteristic_is_cached(&id) {
return Err(BluetoothError::InvalidState);
@@ -909,11 +909,11 @@ impl BluetoothManager {
// (StopNotification) Step 5.
Ok(_) => return Ok(BluetoothResponse::EnableNotification(())),
- // (StartNotification) Step 4.
+ // (StartNotification) Step 5.
Err(_) => return Err(BluetoothError::NotSupported),
}
},
- // (StartNotification) Step 3.
+ // (StartNotification) Step 4.
None => return Err(BluetoothError::InvalidState),
}
}