Update crossbeam-channel to 0.3

This commit is contained in:
Bastien Orivel 2018-11-07 19:48:07 +01:00
parent 76195e0779
commit 9a7eeb349a
74 changed files with 303 additions and 521 deletions

View file

@ -15,6 +15,7 @@ path = "lib.rs"
default = []
[dependencies]
crossbeam-channel = "0.3"
embedder_traits = {path = "../embedder_traits"}
euclid = "0.19"
gfx_traits = {path = "../gfx_traits"}
@ -28,7 +29,6 @@ msg = {path = "../msg"}
net_traits = {path = "../net_traits"}
profile_traits = {path = "../profile_traits"}
script_traits = {path = "../script_traits"}
servo_channel = {path = "../channel"}
servo_config = {path = "../config"}
servo_geometry = {path = "../geometry"}
servo_url = {path = "../url"}

View file

@ -12,6 +12,7 @@ use crate::windowing::{
};
use crate::CompositionPipeline;
use crate::SendableFrameTree;
use crossbeam_channel::Sender;
use euclid::{TypedPoint2D, TypedScale, TypedVector2D};
use gfx_traits::Epoch;
#[cfg(feature = "gleam")]
@ -27,7 +28,6 @@ use script_traits::CompositorEvent::{MouseButtonEvent, MouseMoveEvent, TouchEven
use script_traits::{AnimationState, AnimationTickType, ConstellationMsg, LayoutControlMsg};
use script_traits::{MouseButton, MouseEventType, ScrollState, TouchEventType, TouchId};
use script_traits::{UntrustedNodeAddress, WindowSizeData, WindowSizeType};
use servo_channel::Sender;
use servo_config::opts;
use servo_geometry::DeviceIndependentPixel;
use std::collections::HashMap;

View file

@ -6,6 +6,7 @@
use crate::compositor::CompositingReason;
use crate::SendableFrameTree;
use crossbeam_channel::{Receiver, Sender};
use embedder_traits::EventLoopWaker;
use gfx_traits::Epoch;
use ipc_channel::ipc::IpcSender;
@ -14,7 +15,6 @@ use net_traits::image::base::Image;
use profile_traits::mem;
use profile_traits::time;
use script_traits::{AnimationState, ConstellationMsg, EventResult};
use servo_channel::{Receiver, Sender};
use std::fmt::{Debug, Error, Formatter};
use style_traits::viewport::ViewportConstraints;
use webrender_api::{self, DeviceIntPoint, DeviceUintSize};
@ -50,7 +50,7 @@ pub struct CompositorReceiver {
impl CompositorReceiver {
pub fn try_recv_compositor_msg(&mut self) -> Option<Msg> {
self.receiver.try_recv()
self.receiver.try_recv().ok()
}
pub fn recv_compositor_msg(&mut self) -> Msg {
self.receiver.recv().unwrap()