Skip to content

Commit 83223b5

Browse files
author
Stjepan Glavina
committed
Remove PhantomData
1 parent 417baf2 commit 83223b5

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

src/bounded.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use std::cell::UnsafeCell;
2-
use std::marker::PhantomData;
32
use std::mem::MaybeUninit;
43
use std::sync::atomic::{AtomicUsize, Ordering};
54
use std::thread;
@@ -45,9 +44,6 @@ pub struct Bounded<T> {
4544

4645
/// If this bit is set in the tail, that means the queue is closed.
4746
mark_bit: usize,
48-
49-
/// Indicates that dropping a `Bounded<T>` may drop values of type `T`.
50-
_marker: PhantomData<T>,
5147
}
5248

5349
impl<T> Bounded<T> {
@@ -80,7 +76,6 @@ impl<T> Bounded<T> {
8076
mark_bit,
8177
head: CachePadded::new(AtomicUsize::new(head)),
8278
tail: CachePadded::new(AtomicUsize::new(tail)),
83-
_marker: PhantomData,
8479
}
8580
}
8681

src/unbounded.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use std::cell::UnsafeCell;
2-
use std::marker::PhantomData;
32
use std::mem::MaybeUninit;
43
use std::ptr;
54
use std::sync::atomic::{AtomicPtr, AtomicUsize, Ordering};
@@ -119,9 +118,6 @@ pub struct Unbounded<T> {
119118

120119
/// The tail of the queue.
121120
tail: CachePadded<Position<T>>,
122-
123-
/// Indicates that dropping a `Unbounded<T>` may drop values of type `T`.
124-
_marker: PhantomData<T>,
125121
}
126122

127123
impl<T> Unbounded<T> {
@@ -136,7 +132,6 @@ impl<T> Unbounded<T> {
136132
block: AtomicPtr::new(ptr::null_mut()),
137133
index: AtomicUsize::new(0),
138134
}),
139-
_marker: PhantomData,
140135
}
141136
}
142137

0 commit comments

Comments
 (0)