@@ -176,9 +176,9 @@ and which can be stored by the implementation of those `Futures`s. Whenever a
176
176
waker in order to inform the executor that the task which owns the ` Future `
177
177
should get scheduled and executed again.
178
178
179
- The RFC defines a concrete ` Waker ` types with which implementors of ` Futures `
179
+ The RFC defines a concrete ` Waker ` type with which implementors of ` Futures `
180
180
and asynchronous functions will interact. This type defines a ` wake(&self) `
181
- function which is used to schedule the task that is associated to the ` Waker `
181
+ method which is used to schedule the task that is associated to the ` Waker `
182
182
to be polled again.
183
183
184
184
The mechanism through which tasks get scheduled again depends on the executor
@@ -191,7 +191,7 @@ Possible ways of waking up a an executor include:
191
191
- If the executor's thread is parked, the wakeup call needs to unpark it.
192
192
193
193
To allow executors to implement custom wakeup behavior, the ` Waker ` type
194
- internally contains a type called ` RawWaker ` , which consists of a pointer
194
+ contains a type called ` RawWaker ` , which consists of a pointer
195
195
to a custom wakeable object and a reference to a virtual function
196
196
pointer table (vtable) which provides functions to ` clone ` , ` wake ` , and
197
197
` drop ` the underlying wakeable object.
@@ -295,10 +295,7 @@ impl Waker {
295
295
impl Clone for Waker {
296
296
fn clone (& self ) -> Self {
297
297
Waker {
298
- waker : RawWaker {
299
- data : unsafe { (self . waker. vtable. clone)(self . waker. data) },
300
- vtable : self . waker. vtable,
301
- }
298
+ waker : unsafe { (self . waker. vtable. clone)(self . waker. data) },
302
299
}
303
300
}
304
301
}
0 commit comments