diff options
| author | Matthias Einwag <matthias.einwag@live.com> | 2019-02-05 01:14:09 -0800 |
|---|---|---|
| committer | Matthias Einwag <matthias.einwag@live.com> | 2019-02-05 01:14:09 -0800 |
| commit | e1ec81459da4ba8e0633d90ddf440522a1587f35 (patch) | |
| tree | 5a58aa3a9848468c5cb57ff184e17e5260acf071 /src/libcore/task | |
| parent | f005e1c5d72c775bbb4370e9d8031fbc74efe4eb (diff) | |
| download | rust-e1ec81459da4ba8e0633d90ddf440522a1587f35.tar.gz rust-e1ec81459da4ba8e0633d90ddf440522a1587f35.zip | |
Apply more review suggestions
Diffstat (limited to 'src/libcore/task')
| -rw-r--r-- | src/libcore/task/wake.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libcore/task/wake.rs b/src/libcore/task/wake.rs index fe2de61c594..1f42d3e2690 100644 --- a/src/libcore/task/wake.rs +++ b/src/libcore/task/wake.rs @@ -42,6 +42,9 @@ pub struct RawWakerVTable { /// This function will be called when `wake` is called on the [`Waker`]. /// It must wake up the task associated with this [`RawWaker`]. + /// + /// The implemention of this function must not consume the provided data + /// pointer. pub wake: unsafe fn(*const ()), /// This function gets called when a [`RawWaker`] gets dropped. @@ -125,7 +128,10 @@ impl Drop for Waker { impl fmt::Debug for Waker { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let vtable_ptr = self.waker.vtable as *const RawWakerVTable; f.debug_struct("Waker") + .field("data", &self.waker.data) + .field("vtable", &vtable_ptr) .finish() } } |
