diff options
author | Carl Lerche <me@carllerche.com> | 2020-10-13 15:06:22 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-13 15:06:22 -0700 |
commit | 00b6127f2ed3125f8b305ab4fd9bb90e99762785 (patch) | |
tree | e43ba873fed9f2cc650b6b26cfb0422aabf1a9bd /tokio-util | |
parent | a249421abc44e768217427a68f5f5e23f9d1cbd5 (diff) |
rt: switch `enter` to an RAII guard (#2954)
Diffstat (limited to 'tokio-util')
-rw-r--r-- | tokio-util/src/context.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tokio-util/src/context.rs b/tokio-util/src/context.rs index ae954d85..990c0f14 100644 --- a/tokio-util/src/context.rs +++ b/tokio-util/src/context.rs @@ -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) } } |