@@ -8,15 +8,17 @@ use marker::Unpin;
88/// A `RawWaker` allows the implementor of a task executor to create a `Waker`
99/// which provides customized wakeup behavior.
1010///
11- /// It consists of a data pointer and a virtual function pointer table (vtable) that
11+ /// [vtable]: https://en.wikipedia.org/wiki/Virtual_method_table
12+ ///
13+ /// It consists of a data pointer and a [virtual function pointer table (vtable)][vtable] that
1214/// customizes the behavior of the `RawWaker`.
1315#[ derive( PartialEq ) ]
1416pub struct RawWaker {
1517 /// A data pointer, which can be used to store arbitrary data as required
1618 /// by the executor. This could be e.g. a type-erased pointer to an `Arc`
1719 /// that is associated with the task.
1820 /// The value of this field gets passed to all functions that are part of
19- /// the vtable as first parameter.
21+ /// the vtable as the first parameter.
2022 pub data : * const ( ) ,
2123 /// Virtual function pointer table that customizes the behavior of this waker.
2224 pub vtable : & ' static RawWakerVTable ,
@@ -30,7 +32,7 @@ impl fmt::Debug for RawWaker {
3032}
3133
3234/// A virtual function pointer table (vtable) that specifies the behavior
33- /// of a `RawWaker`.
35+ /// of a [ `RawWaker`] .
3436///
3537/// The pointer passed to all functions inside the vtable is the `data` pointer
3638/// from the enclosing `RawWaker` object.
@@ -105,7 +107,7 @@ impl Waker {
105107 /// contract to make it usable for `Waker` and is therefore unsafe.
106108 pub unsafe fn new_unchecked ( waker : RawWaker ) -> Waker {
107109 Waker {
108- waker : waker ,
110+ waker,
109111 }
110112 }
111113}
0 commit comments