Introduce TaskOnce

Having both TaskBox and TaskOnce allows us to remove the superfluous inner boxing
from CancellableTask<T>.
This commit is contained in:
Anthony Ramine 2017-09-20 10:37:09 +02:00
parent 52527d6f9d
commit 6c9fb5ae7a
26 changed files with 144 additions and 124 deletions

View file

@ -70,7 +70,7 @@ impl VirtualMethods for HTMLDetailsElement {
let this = Trusted::new(self);
// FIXME(nox): Why are errors silenced here?
let _ = window.dom_manipulation_task_source().queue(
box task!(details_notification_task_steps: move || {
task!(details_notification_task_steps: move || {
let this = this.root();
if counter == this.toggle_counter.get() {
this.upcast::<EventTarget>().fire_event(atom!("toggle"));