mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-27 00:00:12 +02:00
sync: polish and update API doc examples (#1398)
- Remove `poll_*` fns from some of the sync types. - Move `AtomicWaker` and `Lock` to the root of the `sync` crate.
This commit is contained in:
@@ -95,7 +95,7 @@ impl<T> UnboundedReceiver<T> {
|
||||
/// TODO: Dox
|
||||
#[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
|
||||
pub async fn recv(&mut self) -> Option<T> {
|
||||
use async_util::future::poll_fn;
|
||||
use futures_util::future::poll_fn;
|
||||
|
||||
poll_fn(|cx| self.poll_recv(cx)).await
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user