Merge pull request #9 from wusyong/debug

Add missing debug implementations
This commit is contained in:
Stjepan Glavina 2020-04-19 07:07:34 -07:00 committed by GitHub
commit d313fc7fb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -46,6 +46,7 @@ pub fn pipe(cap: usize) -> (Reader, Writer) {
// NOTE: Reader and Writer are !Clone + !Sync
/// The reading side of a pipe.
#[derive(Debug)]
pub struct Reader {
inner: Arc<Inner>,
head: Cell<usize>,
@ -53,6 +54,7 @@ pub struct Reader {
}
/// The writing side of a pipe.
#[derive(Debug)]
pub struct Writer {
inner: Arc<Inner>,
head: Cell<usize>,
@ -62,6 +64,7 @@ pub struct Writer {
unsafe impl Send for Reader {}
unsafe impl Send for Writer {}
#[derive(Debug)]
struct Inner {
head: AtomicUsize,
tail: AtomicUsize,