diff options
author | Bastien Orivel <eijebong@bananium.fr> | 2018-11-07 19:48:07 +0100 |
---|---|---|
committer | Bastien Orivel <eijebong@bananium.fr> | 2018-11-18 19:33:19 +0100 |
commit | 9a7eeb349a8aa657e063665ac92387ab8ef3ce28 (patch) | |
tree | 63c5aa1ba7cd7fdb1bf14bcc9cbb6e6c0e24431b /components/script_traits/lib.rs | |
parent | 76195e0779469f29a5e27cd882e2bbe8b2c9d6dd (diff) | |
download | servo-9a7eeb349a8aa657e063665ac92387ab8ef3ce28.tar.gz servo-9a7eeb349a8aa657e063665ac92387ab8ef3ce28.zip |
Update crossbeam-channel to 0.3
Diffstat (limited to 'components/script_traits/lib.rs')
-rw-r--r-- | components/script_traits/lib.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs index 00a60d1f3e8..eba51e6ae75 100644 --- a/components/script_traits/lib.rs +++ b/components/script_traits/lib.rs @@ -22,6 +22,7 @@ pub mod webdriver_msg; use bluetooth_traits::BluetoothRequest; use canvas_traits::webgl::WebGLPipeline; use crate::webdriver_msg::{LoadStatus, WebDriverScriptCommand}; +use crossbeam_channel::{Receiver, RecvTimeoutError, Sender}; use devtools_traits::{DevtoolScriptControlMsg, ScriptToDevtoolsControlMsg, WorkerId}; use euclid::{Length, Point2D, Rect, TypedScale, TypedSize2D, Vector2D}; use gfx_traits::Epoch; @@ -42,7 +43,6 @@ use profile_traits::mem; use profile_traits::time as profile_time; use serde::{Deserialize, Deserializer, Serialize, Serializer}; use servo_atoms::Atom; -use servo_channel::{Receiver, Sender}; use servo_url::ImmutableOrigin; use servo_url::ServoUrl; use std::collections::HashMap; @@ -828,6 +828,12 @@ pub enum PaintWorkletError { WorkletNotFound, } +impl From<RecvTimeoutError> for PaintWorkletError { + fn from(_: RecvTimeoutError) -> PaintWorkletError { + PaintWorkletError::Timeout + } +} + /// Execute paint code in the worklet thread pool. pub trait Painter: SpeculativePainter { /// <https://drafts.css-houdini.org/css-paint-api/#draw-a-paint-image> |