From 5aa8f3c9a66b42c8764e52aa96dfac678dbb4f0e Mon Sep 17 00:00:00 2001 From: Ivan Petkov Date: Tue, 9 Mar 2021 22:05:55 -0800 Subject: [PATCH] revert --- tokio/src/signal/unix/driver.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tokio/src/signal/unix/driver.rs b/tokio/src/signal/unix/driver.rs index ab864473467..315f3bd5830 100644 --- a/tokio/src/signal/unix/driver.rs +++ b/tokio/src/signal/unix/driver.rs @@ -39,14 +39,6 @@ pub(crate) struct Handle { #[derive(Debug)] pub(super) struct Inner(()); -const NOOP_WAKER_VTABLE: RawWakerVTable = RawWakerVTable::new(noop_clone, noop, noop, noop); - -unsafe fn noop_clone(_data: *const ()) -> RawWaker { - RawWaker::new(ptr::null(), &NOOP_WAKER_VTABLE) -} - -unsafe fn noop(_data: *const ()) {} - // ===== impl Driver ===== impl Driver { @@ -136,6 +128,14 @@ impl Driver { } } +const NOOP_WAKER_VTABLE: RawWakerVTable = RawWakerVTable::new(noop_clone, noop, noop, noop); + +unsafe fn noop_clone(_data: *const ()) -> RawWaker { + RawWaker::new(ptr::null(), &NOOP_WAKER_VTABLE) +} + +unsafe fn noop(_data: *const ()) {} + // ===== impl Park for Driver ===== impl Park for Driver {