mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-08 00:00:13 +02:00
chore: fix dead code warnings (#6423)
This commit is contained in:
@@ -4,7 +4,7 @@ use criterion::measurement::WallTime;
|
||||
use criterion::{black_box, criterion_group, criterion_main, BenchmarkGroup, Criterion};
|
||||
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
struct Medium([usize; 64]);
|
||||
struct Medium(#[allow(dead_code)] [usize; 64]);
|
||||
impl Default for Medium {
|
||||
fn default() -> Self {
|
||||
Medium([0; 64])
|
||||
@@ -12,7 +12,7 @@ impl Default for Medium {
|
||||
}
|
||||
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
struct Large([Medium; 64]);
|
||||
struct Large(#[allow(dead_code)] [Medium; 64]);
|
||||
impl Default for Large {
|
||||
fn default() -> Self {
|
||||
Large([Medium::default(); 64])
|
||||
|
||||
@@ -52,7 +52,7 @@ fn notify_waiters_handles_panicking_waker() {
|
||||
|
||||
let notify = Arc::new(Notify::new());
|
||||
|
||||
struct PanickingWaker(Arc<Notify>);
|
||||
struct PanickingWaker(#[allow(dead_code)] Arc<Notify>);
|
||||
|
||||
impl ArcWake for PanickingWaker {
|
||||
fn wake_by_ref(_arc_self: &Arc<Self>) {
|
||||
|
||||
@@ -268,7 +268,7 @@ fn release_permits_at_drop() {
|
||||
|
||||
let sem = Arc::new(Semaphore::new(1));
|
||||
|
||||
struct ReleaseOnDrop(Option<OwnedSemaphorePermit>);
|
||||
struct ReleaseOnDrop(#[allow(dead_code)] Option<OwnedSemaphorePermit>);
|
||||
|
||||
impl ArcWake for ReleaseOnDrop {
|
||||
fn wake_by_ref(_arc_self: &Arc<Self>) {}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/// Marker for types that are `Sync` but not `Send`
|
||||
pub(crate) struct SyncNotSend(*mut ());
|
||||
pub(crate) struct SyncNotSend(#[allow(dead_code)] *mut ());
|
||||
|
||||
unsafe impl Sync for SyncNotSend {}
|
||||
|
||||
cfg_rt! {
|
||||
pub(crate) struct NotSendOrSync(*mut ());
|
||||
pub(crate) struct NotSendOrSync(#[allow(dead_code)] *mut ());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user