chore: fix clippy warnings (#6466)

This commit is contained in:
Rafael Bachmann
2024-04-08 20:44:18 +09:00
committed by GitHub
parent b6d74ac4eb
commit be9328da75
15 changed files with 29 additions and 12 deletions
+7
View File
@@ -14,16 +14,19 @@ use tokio::time::{Duration, Instant};
// The names of these structs behaves better when sorted.
// Send: Yes, Sync: Yes
#[derive(Clone)]
#[allow(unused)]
struct YY {}
// Send: Yes, Sync: No
#[derive(Clone)]
#[allow(unused)]
struct YN {
_value: Cell<u8>,
}
// Send: No, Sync: No
#[derive(Clone)]
#[allow(unused)]
struct NN {
_value: Rc<u8>,
}
@@ -52,18 +55,21 @@ fn require_unpin<T: Unpin>(_t: &T) {}
#[allow(dead_code)]
struct Invalid;
#[allow(unused)]
trait AmbiguousIfSend<A> {
fn some_item(&self) {}
}
impl<T: ?Sized> AmbiguousIfSend<()> for T {}
impl<T: ?Sized + Send> AmbiguousIfSend<Invalid> for T {}
#[allow(unused)]
trait AmbiguousIfSync<A> {
fn some_item(&self) {}
}
impl<T: ?Sized> AmbiguousIfSync<()> for T {}
impl<T: ?Sized + Sync> AmbiguousIfSync<Invalid> for T {}
#[allow(unused)]
trait AmbiguousIfUnpin<A> {
fn some_item(&self) {}
}
@@ -712,6 +718,7 @@ mod unix_asyncfd {
use super::*;
use tokio::io::unix::*;
#[allow(unused)]
struct ImplsFd<T> {
_t: T,
}