mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Switches characteristic to use BufferSource
This commit is contained in:
parent
40235da2d3
commit
5bf2e71407
6 changed files with 17 additions and 12 deletions
|
@ -125,11 +125,11 @@ impl BluetoothRemoteGATTDescriptorMethods for BluetoothRemoteGATTDescriptor {
|
|||
}
|
||||
|
||||
// Step 2 - 3.
|
||||
let v = match value {
|
||||
let vec = match value {
|
||||
ArrayBufferViewOrArrayBuffer::ArrayBufferView(mut avb) => avb.to_vec(),
|
||||
ArrayBufferViewOrArrayBuffer::ArrayBuffer(mut ab) => ab.to_vec(),
|
||||
};
|
||||
if v.len() > MAXIMUM_ATTRIBUTE_LENGTH {
|
||||
if vec.len() > MAXIMUM_ATTRIBUTE_LENGTH {
|
||||
p.reject_error(InvalidModification);
|
||||
return p;
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ impl BluetoothRemoteGATTDescriptorMethods for BluetoothRemoteGATTDescriptor {
|
|||
// in writeValue function and in handle_response function.
|
||||
let sender = response_async(&p, self);
|
||||
self.get_bluetooth_thread().send(
|
||||
BluetoothRequest::WriteValue(self.get_instance_id(), v, sender)).unwrap();
|
||||
BluetoothRequest::WriteValue(self.get_instance_id(), vec, sender)).unwrap();
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue