rust/library/core
Kevin Reid 6f8a944ba4 Change return type of unstable Waker::noop() from Waker to &Waker.
The advantage of this is that it does not need to be assigned to a
variable to be used in a `Context` creation, which is the most common
thing to want to do with a noop waker.

If an owned noop waker is desired, it can be created by cloning, but the
reverse is harder. Alternatively, both versions could be provided, like
`futures::task::noop_waker()` and `futures::task::noop_waker_ref()`, but
that seems to me to be API clutter for a very small benefit, whereas
having the `&'static` reference available is a large benefit.

Previous discussion on the tracking issue starting here:
https://github.com/rust-lang/rust/issues/98286#issuecomment-1862159766
2024-01-17 11:53:16 -08:00
..
benches Reduced amount of int_pow benches 2024-01-11 14:00:01 -05:00
src Change return type of unstable Waker::noop() from Waker to &Waker. 2024-01-17 11:53:16 -08:00
tests apply fmt 2024-01-11 15:04:48 +03:00
Cargo.toml Update rand in the stdlib tests, and remove the getrandom feature from it 2023-01-04 14:52:41 -08:00