Reformat some task-related functions

This commit is contained in:
Anthony Ramine 2017-09-08 10:19:06 +02:00
parent 35a7252254
commit 53d30d85b3
3 changed files with 28 additions and 20 deletions

View file

@ -25,11 +25,14 @@ impl fmt::Debug for DOMManipulationTaskSource {
}
impl TaskSource for DOMManipulationTaskSource {
fn queue_with_wrapper<T>(&self,
msg: Box<T>,
wrapper: &RunnableWrapper)
-> Result<(), ()>
where T: Runnable + Send + 'static {
fn queue_with_wrapper<T>(
&self,
msg: Box<T>,
wrapper: &RunnableWrapper,
) -> Result<(), ()>
where
T: Runnable + Send + 'static,
{
let msg = MainThreadScriptMsg::Common(CommonScriptMsg::RunnableMsg(
ScriptThreadEventCategory::ScriptEvent,
wrapper.wrap_runnable(msg),

View file

@ -25,11 +25,14 @@ impl fmt::Debug for UserInteractionTaskSource {
}
impl TaskSource for UserInteractionTaskSource {
fn queue_with_wrapper<T>(&self,
msg: Box<T>,
wrapper: &RunnableWrapper)
-> Result<(), ()>
where T: Runnable + Send + 'static {
fn queue_with_wrapper<T>(
&self,
msg: Box<T>,
wrapper: &RunnableWrapper,
) -> Result<(), ()>
where
T: Runnable + Send + 'static,
{
let msg = MainThreadScriptMsg::Common(CommonScriptMsg::RunnableMsg(
ScriptThreadEventCategory::InputEvent,
wrapper.wrap_runnable(msg),