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/script_runtime.rs | |
parent | 07f6e114850896eae2fd206351808fb31cceaaf0 (diff) | |
download | servo-a47e94c8f6b37de9845c824c6a8a488728a1d0c1.tar.gz servo-a47e94c8f6b37de9845c824c6a8a488728a1d0c1.zip |
Added Debug implementations.
Diffstat (limited to 'components/script/script_runtime.rs')
-rw-r--r-- | components/script/script_runtime.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/components/script/script_runtime.rs b/components/script/script_runtime.rs index 8c243b18695..efbdb6bdc40 100644 --- a/components/script/script_runtime.rs +++ b/components/script/script_runtime.rs @@ -27,6 +27,7 @@ use script_thread::{Runnable, STACK_ROOTS, trace_thread}; use servo_config::opts; use servo_config::prefs::PREFS; use std::cell::Cell; +use std::fmt; use std::io::{Write, stdout}; use std::marker::PhantomData; use std::os; @@ -45,6 +46,15 @@ pub enum CommonScriptMsg { RunnableMsg(ScriptThreadEventCategory, Box<Runnable + Send>), } +impl fmt::Debug for CommonScriptMsg { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + CommonScriptMsg::CollectReports(_) => write!(f, "CollectReports(...)"), + CommonScriptMsg::RunnableMsg(category, _) => write!(f, "RunnableMsg({:?}, ...)", category), + } + } +} + /// A cloneable interface for communicating with an event loop. pub trait ScriptChan: JSTraceable { /// Send a message to the associated event loop. |