Cleanups and tidy fixes

This commit is contained in:
Fernando Jiménez Moreno 2020-06-02 10:52:34 +02:00
parent ace0d7795e
commit 960b010d30
8 changed files with 23 additions and 24 deletions

View file

@ -282,26 +282,26 @@ impl RTCDataChannelMethods for RTCDataChannel {
// fn SetBufferedAmountLowThreshold(&self, value: u32) -> ();
// https://www.w3.org/TR/webrtc/#dom-rtcdatachannel-close
fn Close(&self) -> () {}
fn Close(&self) {}
// fn BinaryType(&self) -> DOMString;
// fn SetBinaryType(&self, value: DOMString) -> ();
// https://www.w3.org/TR/webrtc/#dom-rtcdatachannel-send
fn Send(&self, data: USVString) -> () {
fn Send(&self, data: USVString) {
if let Err(error) = self.channel.send(&data.0) {
warn!("Could not send data channel message. Error: {:?}", error);
}
}
// https://www.w3.org/TR/webrtc/#dom-rtcdatachannel-send!overload-1
fn Send_(&self, data: &Blob) -> () {}
// fn Send_(&self, data: &Blob) -> () {}
// https://www.w3.org/TR/webrtc/#dom-rtcdatachannel-send!overload-2
fn Send__(&self, data: CustomAutoRooterGuard<ArrayBuffer>) -> () {}
// fn Send__(&self, data: CustomAutoRooterGuard<ArrayBuffer>) -> () {}
// https://www.w3.org/TR/webrtc/#dom-rtcdatachannel-send!overload-3
fn Send___(&self, data: CustomAutoRooterGuard<ArrayBufferView>) -> () {}
// fn Send___(&self, data: CustomAutoRooterGuard<ArrayBufferView>) -> () {}
}
impl From<&RTCDataChannelInit> for WebRtcDataChannelInit {