removed instances of -> () in existing code

This commit is contained in:
lucantrop 2017-03-13 17:27:14 +01:00
parent b1faaa15dc
commit d6568e608b
8 changed files with 29 additions and 29 deletions

View file

@ -288,7 +288,7 @@ impl Emitter {
}
}
fn send(&mut self, markers: Vec<TimelineMarkerReply>) -> () {
fn send(&mut self, markers: Vec<TimelineMarkerReply>) {
let end_time = PreciseTime::now();
let reply = MarkersEmitterReply {
type_: "markers".to_owned(),

View file

@ -251,7 +251,7 @@ impl BluetoothDeviceMethods for BluetoothDevice {
}
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothdevice-unwatchadvertisements
fn UnwatchAdvertisements(&self) -> () {
fn UnwatchAdvertisements(&self) {
// Step 1.
self.watching_advertisements.set(false)
// TODO: Step 2.

View file

@ -888,7 +888,7 @@ impl CanvasRenderingContext2DMethods for CanvasRenderingContext2D {
}
// https://html.spec.whatwg.org/multipage/#dom-context-2d-imagesmoothingenabled
fn SetImageSmoothingEnabled(&self, value: bool) -> () {
fn SetImageSmoothingEnabled(&self, value: bool) {
self.state.borrow_mut().image_smoothing_enabled = value;
}

View file

@ -247,8 +247,8 @@ impl TestBindingMethods for TestBinding {
Some(ByteStringOrLong::ByteString(ByteString::new(vec!())))
}
fn SetUnion6AttributeNullable(&self, _: Option<ByteStringOrLong>) {}
fn BinaryRenamedMethod(&self) -> () {}
fn ReceiveVoid(&self) -> () {}
fn BinaryRenamedMethod(&self) {}
fn ReceiveVoid(&self) {}
fn ReceiveBoolean(&self) -> bool { false }
fn ReceiveByte(&self) -> i8 { 0 }
fn ReceiveOctet(&self) -> u8 { 0 }

View file

@ -18,15 +18,15 @@ impl TestBindingProxyMethods for TestBindingProxy {
fn Length(&self) -> u32 { 0 }
fn SupportedPropertyNames(&self) -> Vec<DOMString> { vec![] }
fn GetNamedItem(&self, _: DOMString) -> DOMString { DOMString::new() }
fn SetNamedItem(&self, _: DOMString, _: DOMString) -> () {}
fn SetNamedItem(&self, _: DOMString, _: DOMString) {}
fn GetItem(&self, _: u32) -> DOMString { DOMString::new() }
fn SetItem(&self, _: u32, _: DOMString) -> () {}
fn RemoveItem(&self, _: DOMString) -> () {}
fn SetItem(&self, _: u32, _: DOMString) {}
fn RemoveItem(&self, _: DOMString) {}
fn Stringifier(&self) -> DOMString { DOMString::new() }
fn IndexedGetter(&self, _: u32) -> Option<DOMString> { None }
fn NamedDeleter(&self, _: DOMString) -> () {}
fn IndexedSetter(&self, _: u32, _: DOMString) -> () {}
fn NamedSetter(&self, _: DOMString, _: DOMString) -> () {}
fn NamedDeleter(&self, _: DOMString) {}
fn IndexedSetter(&self, _: u32, _: DOMString) {}
fn NamedSetter(&self, _: DOMString, _: DOMString) {}
fn NamedGetter(&self, _: DOMString) -> Option<DOMString> { None }
}

View file

@ -203,7 +203,7 @@ impl VRDisplayMethods for VRDisplay {
}
// https://w3c.github.io/webvr/#dom-vrdisplay-resetpose
fn ResetPose(&self) -> () {
fn ResetPose(&self) {
let (sender, receiver) = ipc::channel().unwrap();
self.webvr_thread().send(WebVRMsg::ResetPose(self.global().pipeline_id(),
self.get_display_id(),
@ -220,7 +220,7 @@ impl VRDisplayMethods for VRDisplay {
}
// https://w3c.github.io/webvr/#dom-vrdisplay-depthnear
fn SetDepthNear(&self, value: Finite<f64>) -> () {
fn SetDepthNear(&self, value: Finite<f64>) {
self.depth_near.set(*value.deref());
}
@ -230,7 +230,7 @@ impl VRDisplayMethods for VRDisplay {
}
// https://w3c.github.io/webvr/#dom-vrdisplay-depthfar
fn SetDepthFar(&self, value: Finite<f64>) -> () {
fn SetDepthFar(&self, value: Finite<f64>) {
self.depth_far.set(*value.deref());
}
@ -249,7 +249,7 @@ impl VRDisplayMethods for VRDisplay {
}
// https://w3c.github.io/webvr/#dom-vrdisplay-cancelanimationframe
fn CancelAnimationFrame(&self, handle: u32) -> () {
fn CancelAnimationFrame(&self, handle: u32) {
if self.presenting.get() {
let mut list = self.raf_callback_list.borrow_mut();
if let Some(mut pair) = list.iter_mut().find(|pair| pair.0 == handle) {
@ -364,7 +364,7 @@ impl VRDisplayMethods for VRDisplay {
}
// https://w3c.github.io/webvr/#dom-vrdisplay-submitframe
fn SubmitFrame(&self) -> () {
fn SubmitFrame(&self) {
if !self.presenting.get() {
warn!("VRDisplay not presenting");
return;

View file

@ -27,12 +27,12 @@ macro_rules! impl_arc_ffi {
unsafe impl HasArcFFI for $servo_type {}
#[no_mangle]
pub unsafe extern "C" fn $addref(obj: &$gecko_type) -> () {
pub unsafe extern "C" fn $addref(obj: &$gecko_type) {
<$servo_type>::addref(obj);
}
#[no_mangle]
pub unsafe extern "C" fn $release(obj: &$gecko_type) -> () {
pub unsafe extern "C" fn $release(obj: &$gecko_type) {
<$servo_type>::release(obj);
}
}