Preserve the name of inner tasks in cancellable ones

This commit is contained in:
Anthony Ramine 2017-09-18 10:51:07 +02:00
parent a7655a3f84
commit 5ed6abe22c

View file

@ -82,6 +82,10 @@ impl<T> Task for CancellableTask<T>
where
T: Send + Task,
{
fn name(&self) -> &'static str {
self.inner.name()
}
fn run(self: Box<Self>) {
if !self.is_cancelled() {
self.inner.run()