diff --git a/ports/gonk/src/input.rs b/ports/gonk/src/input.rs index 511a35d7a03..73dcb9b15b6 100644 --- a/ports/gonk/src/input.rs +++ b/ports/gonk/src/input.rs @@ -97,16 +97,16 @@ fn read_input_device(device_path: &Path, }; let fd = device.as_raw_fd(); - let x_info: linux_input_absinfo = unsafe { zeroed() }; - let y_info: linux_input_absinfo = unsafe { zeroed() }; + let mut x_info: linux_input_absinfo = unsafe { zeroed() }; + let mut y_info: linux_input_absinfo = unsafe { zeroed() }; unsafe { - let ret = ioctl(fd, ev_ioc_g_abs(ABS_MT_POSITION_X), &x_info); + let ret = ioctl(fd, ev_ioc_g_abs(ABS_MT_POSITION_X), &mut x_info); if ret < 0 { println!("Couldn't get ABS_MT_POSITION_X info {} {}", ret, errno()); } } unsafe { - let ret = ioctl(fd, ev_ioc_g_abs(ABS_MT_POSITION_Y), &y_info); + let ret = ioctl(fd, ev_ioc_g_abs(ABS_MT_POSITION_Y), &mut y_info); if ret < 0 { println!("Couldn't get ABS_MT_POSITION_Y info {} {}", ret, errno()); } @@ -166,9 +166,9 @@ fn read_input_device(device_path: &Path, if dist < 16 { let click_pt = TypedPoint2D(slotA.x as f32, slotA.y as f32); println!("Dispatching click!"); - sender.send(WindowEvent::MouseWindowEventClass(MouseWindowEvent::MouseDown(0, click_pt))).ok(); - sender.send(WindowEvent::MouseWindowEventClass(MouseWindowEvent::MouseUp(0, click_pt))).ok(); - sender.send(WindowEvent::MouseWindowEventClass(MouseWindowEvent::Click(0, click_pt))).ok(); + sender.send(WindowEvent::MouseWindowEventClass(MouseWindowEvent::MouseDown(0, click_pt))).ok().unwrap(); + sender.send(WindowEvent::MouseWindowEventClass(MouseWindowEvent::MouseUp(0, click_pt))).ok().unwrap(); + sender.send(WindowEvent::MouseWindowEventClass(MouseWindowEvent::Click(0, click_pt))).ok().unwrap(); } } else { println!("Touch down"); @@ -184,14 +184,14 @@ fn read_input_device(device_path: &Path, } else { println!("Touch move x: {}, y: {}", slotA.x, slotA.y); sender.send(WindowEvent::Scroll(TypedPoint2D((slotA.x - last_x) as f32, (slotA.y - last_y) as f32), - TypedPoint2D(slotA.x, slotA.y))).ok(); + TypedPoint2D(slotA.x, slotA.y))).ok().unwrap(); last_x = slotA.x; last_y = slotA.y; if touch_count >= 2 { let slotB = &slots[1]; let cur_dist = dist(slotA.x, slotB.x, slotA.y, slotB.y); println!("Zooming {} {} {} {}", cur_dist, last_dist, screen_dist, ((screen_dist + (cur_dist - last_dist))/screen_dist)); - sender.send(WindowEvent::Zoom((screen_dist + (cur_dist - last_dist))/screen_dist)).ok(); + sender.send(WindowEvent::Zoom((screen_dist + (cur_dist - last_dist))/screen_dist)).ok().unwrap(); last_dist = cur_dist; } } diff --git a/ports/gonk/src/lib.rs b/ports/gonk/src/lib.rs index 036fa9049b7..b547e878866 100644 --- a/ports/gonk/src/lib.rs +++ b/ports/gonk/src/lib.rs @@ -125,11 +125,11 @@ impl Browser where Window: WindowMethods + 'static { }; let ConstellationChan(ref chan) = constellation_chan; - chan.send(ConstellationMsg::InitLoadUrl(url)).ok(); + chan.send(ConstellationMsg::InitLoadUrl(url)).ok().unwrap(); } // Send the constallation Chan as the result - result_chan.send(constellation_chan).ok(); + result_chan.send(constellation_chan).ok().unwrap(); }); let constellation_chan = result_port.recv().unwrap(); diff --git a/ports/gonk/src/window.rs b/ports/gonk/src/window.rs index d497710befc..818e62c6835 100644 --- a/ports/gonk/src/window.rs +++ b/ports/gonk/src/window.rs @@ -849,8 +849,8 @@ struct GonkCompositorProxy { impl CompositorProxy for GonkCompositorProxy { fn send(&mut self, msg: compositor_task::Msg) { // Send a message and kick the OS event loop awake. - self.sender.send(msg).ok(); - self.event_sender.send(WindowEvent::Idle).ok(); + self.sender.send(msg).ok().unwrap(); + self.event_sender.send(WindowEvent::Idle).ok().unwrap(); } fn clone_compositor_proxy(&self) -> Box { Box::new(GonkCompositorProxy {