mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-29 00:00:11 +02:00
chore: bump to newer nightly (#1426)
This commit is contained in:
@@ -111,7 +111,6 @@ impl<T> Lock<T> {
|
||||
}
|
||||
|
||||
/// A future that resolves on acquiring the lock and returns the `LockGuard`.
|
||||
#[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
|
||||
pub async fn lock(&mut self) -> LockGuard<T> {
|
||||
poll_fn(|cx| self.poll_lock(cx)).await
|
||||
}
|
||||
|
||||
@@ -167,7 +167,6 @@ impl<T> Receiver<T> {
|
||||
/// assert_eq!(Some("world"), rx.recv().await);
|
||||
/// }
|
||||
/// ```
|
||||
#[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
|
||||
pub async fn recv(&mut self) -> Option<T> {
|
||||
use futures_util::future::poll_fn;
|
||||
|
||||
@@ -244,7 +243,6 @@ impl<T> Sender<T> {
|
||||
/// }
|
||||
/// }
|
||||
/// ```
|
||||
#[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
|
||||
pub async fn send(&mut self, value: T) -> Result<(), SendError> {
|
||||
use futures_util::future::poll_fn;
|
||||
|
||||
|
||||
@@ -135,7 +135,6 @@ impl<T> UnboundedReceiver<T> {
|
||||
/// assert_eq!(Some("world"), rx.recv().await);
|
||||
/// }
|
||||
/// ```
|
||||
#[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
|
||||
pub async fn recv(&mut self) -> Option<T> {
|
||||
use futures_util::future::poll_fn;
|
||||
|
||||
|
||||
@@ -225,7 +225,6 @@ impl<T> Sender<T> {
|
||||
/// println!("the receiver dropped");
|
||||
/// }
|
||||
/// ```
|
||||
#[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
|
||||
pub async fn closed(&mut self) {
|
||||
use futures_util::future::poll_fn;
|
||||
|
||||
|
||||
@@ -306,7 +306,7 @@ impl WakerRef for Waker {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> WakerRef for &'a Waker {
|
||||
impl WakerRef for &Waker {
|
||||
fn wake(self) {
|
||||
self.wake_by_ref()
|
||||
}
|
||||
|
||||
@@ -249,8 +249,7 @@ impl<T> Receiver<T> {
|
||||
///
|
||||
/// Only the **most recent** value is returned. If the receiver is falling
|
||||
/// behind the sender, intermediate values are dropped.
|
||||
#[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
|
||||
pub async fn recv_ref<'a>(&'a mut self) -> Option<Ref<'a, T>> {
|
||||
pub async fn recv_ref(&mut self) -> Option<Ref<'_, T>> {
|
||||
let shared = &self.shared;
|
||||
let inner = &self.inner;
|
||||
let version = self.ver;
|
||||
@@ -296,7 +295,7 @@ impl<T: Clone> Receiver<T> {
|
||||
///
|
||||
/// This is equivalent to calling `clone()` on the value returned by
|
||||
/// `recv()`.
|
||||
#[allow(clippy::needless_lifetimes, clippy::map_clone)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
|
||||
#[allow(clippy::map_clone)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3274
|
||||
pub async fn recv(&mut self) -> Option<T> {
|
||||
self.recv_ref().await.map(|v_ref| v_ref.clone())
|
||||
}
|
||||
@@ -388,7 +387,6 @@ impl<T> Sender<T> {
|
||||
///
|
||||
/// This allows the producer to get notified when interest in the produced
|
||||
/// values is canceled and immediately stop doing work.
|
||||
#[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
|
||||
pub async fn closed(&mut self) {
|
||||
poll_fn(|cx| self.poll_close(cx)).await
|
||||
}
|
||||
@@ -447,7 +445,7 @@ impl<T> Drop for Sender<T> {
|
||||
|
||||
// ===== impl Ref =====
|
||||
|
||||
impl<'a, T: 'a> ops::Deref for Ref<'a, T> {
|
||||
impl<T> ops::Deref for Ref<'_, T> {
|
||||
type Target = T;
|
||||
|
||||
fn deref(&self) -> &T {
|
||||
|
||||
Reference in New Issue
Block a user