rt: switch enter to an RAII guard (#2954)

This commit is contained in:
Carl Lerche
2020-10-13 15:06:22 -07:00
committed by GitHub
parent a249421abc
commit 00b6127f2e
11 changed files with 96 additions and 99 deletions
+2 -1
View File
@@ -34,7 +34,8 @@ impl<F: Future> Future for TokioContext<'_, F> {
let handle = me.handle;
let fut = me.inner;
handle.enter(|| fut.poll(cx))
let _enter = handle.enter();
fut.poll(cx)
}
}