chore: fix dead code warnings (#6423)

This commit is contained in:
M.Amin Rayej
2024-03-22 13:44:18 +03:30
committed by GitHub
parent d51f16855b
commit bb25a06f34
4 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -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])
+1 -1
View File
@@ -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>) {
+1 -1
View File
@@ -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>) {}
+2 -2
View File
@@ -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 ());
}