diff options
author | Alan Jeffrey <ajeffrey@mozilla.com> | 2017-06-13 10:46:59 -0500 |
---|---|---|
committer | Alan Jeffrey <ajeffrey@mozilla.com> | 2017-06-13 10:46:59 -0500 |
commit | a47e94c8f6b37de9845c824c6a8a488728a1d0c1 (patch) | |
tree | 22b49d54306e8a3b72042ad666964120fbbc34b2 /components/script/task_source/user_interaction.rs | |
parent | 07f6e114850896eae2fd206351808fb31cceaaf0 (diff) | |
download | servo-a47e94c8f6b37de9845c824c6a8a488728a1d0c1.tar.gz servo-a47e94c8f6b37de9845c824c6a8a488728a1d0c1.zip |
Added Debug implementations.
Diffstat (limited to 'components/script/task_source/user_interaction.rs')
-rw-r--r-- | components/script/task_source/user_interaction.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/components/script/task_source/user_interaction.rs b/components/script/task_source/user_interaction.rs index c97e1e1895a..2878a347eb4 100644 --- a/components/script/task_source/user_interaction.rs +++ b/components/script/task_source/user_interaction.rs @@ -9,6 +9,7 @@ use dom::eventtarget::EventTarget; use dom::window::Window; use script_thread::{MainThreadScriptMsg, Runnable, RunnableWrapper, ScriptThread}; use servo_atoms::Atom; +use std::fmt; use std::result::Result; use std::sync::mpsc::Sender; use task_source::TaskSource; @@ -16,6 +17,12 @@ use task_source::TaskSource; #[derive(JSTraceable, Clone)] pub struct UserInteractionTaskSource(pub Sender<MainThreadScriptMsg>); +impl fmt::Debug for UserInteractionTaskSource { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "UserInteractionTaskSource(...)") + } +} + impl TaskSource for UserInteractionTaskSource { fn queue_with_wrapper<T>(&self, msg: Box<T>, @@ -47,6 +54,12 @@ impl UserInteractionTaskSource { pub struct UserInteractionTask(pub Box<Runnable + Send>); +impl fmt::Debug for UserInteractionTask { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "UserInteractionTask(...)") + } +} + impl UserInteractionTask { pub fn handle_task(self, script_thread: &ScriptThread) { if !self.0.is_cancelled() { |