LocalWaker docs: Make long-ago omitted but probably intended changes
In 6f8a944ba4
, titled
Change return type of unstable `Waker::noop()` from `Waker` to `&Waker`.
the summary line for Waker was changed:
- /// Creates a new `Waker` that does nothing when `wake` is called.
+ /// Returns a reference to a `Waker` that does nothing when used.
and the sentence about clone was added.
LocalWaker's docs were not changed, even though the types were, but
there is no explanation for why not. It seems like it was simply a
slip induced by the clone-and-hack.
This commit is contained in:
parent
b18c7d85a9
commit
c404406a87
@ -786,7 +786,7 @@ pub fn will_wake(&self, other: &LocalWaker) -> bool {
|
||||
Self { waker }
|
||||
}
|
||||
|
||||
/// Creates a new `LocalWaker` that does nothing when `wake` is called.
|
||||
/// Returns a reference to a `LocalWaker` that does nothing when used.
|
||||
///
|
||||
// Note! Much of the documentation for this method is duplicated
|
||||
// in the docs for `Waker::noop`.
|
||||
@ -796,6 +796,8 @@ pub fn will_wake(&self, other: &LocalWaker) -> bool {
|
||||
/// some futures, but are not expecting those futures to wake the waker or
|
||||
/// do not need to do anything specific if it happens.
|
||||
///
|
||||
/// If an owned `LocalWaker` is needed, `clone()` this one.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
|
Loading…
Reference in New Issue
Block a user