diff options
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. |