From d70f575afd45f6b70da2edf50f629ac86a8faf16 Mon Sep 17 00:00:00 2001 From: Carl Lerche <me@carllerche.com> Date: Tue, 7 Mar 2017 10:20:58 -0800 Subject: [PATCH] Provide Debug impls for all types --- src/buf/chain.rs | 1 + src/buf/iter.rs | 1 + src/buf/reader.rs | 1 + src/buf/take.rs | 1 + src/buf/writer.rs | 1 + src/lib.rs | 2 +- 6 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/buf/chain.rs b/src/buf/chain.rs index c026981..7dd44ab 100644 --- a/src/buf/chain.rs +++ b/src/buf/chain.rs @@ -26,6 +26,7 @@ use iovec::IoVec; /// [`Buf::chain`]: trait.Buf.html#method.chain /// [`Buf`]: trait.Buf.html /// [`BufMut`]: trait.BufMut.html +#[derive(Debug)] pub struct Chain<T, U> { a: T, b: U, diff --git a/src/buf/iter.rs b/src/buf/iter.rs index d9cf41f..c4d47e9 100644 --- a/src/buf/iter.rs +++ b/src/buf/iter.rs @@ -22,6 +22,7 @@ use Buf; /// /// [`iter`]: trait.Buf.html#method.iter /// [`Buf`]: trait.Buf.html +#[derive(Debug)] pub struct Iter<T> { inner: T, } diff --git a/src/buf/reader.rs b/src/buf/reader.rs index c935753..59f9c33 100644 --- a/src/buf/reader.rs +++ b/src/buf/reader.rs @@ -7,6 +7,7 @@ use std::{cmp, io}; /// This struct is generally created by calling `reader()` on `Buf`. See /// documentation of [`reader()`](trait.Buf.html#method.reader) for more /// details. +#[derive(Debug)] pub struct Reader<B> { buf: B, } diff --git a/src/buf/take.rs b/src/buf/take.rs index 7e40959..53c2933 100644 --- a/src/buf/take.rs +++ b/src/buf/take.rs @@ -6,6 +6,7 @@ use std::cmp; /// /// This struct is generally created by calling `take()` on `Buf`. See /// documentation of [`take()`](trait.Buf.html#method.take) for more details. +#[derive(Debug)] pub struct Take<T> { inner: T, limit: usize, diff --git a/src/buf/writer.rs b/src/buf/writer.rs index ed0d431..38a739a 100644 --- a/src/buf/writer.rs +++ b/src/buf/writer.rs @@ -7,6 +7,7 @@ use std::{cmp, io}; /// This struct is generally created by calling `writer()` on `BufMut`. See /// documentation of [`writer()`](trait.BufMut.html#method.writer) for more /// details. +#[derive(Debug)] pub struct Writer<B> { buf: B, } diff --git a/src/lib.rs b/src/lib.rs index d62db78..13f17c5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -68,7 +68,7 @@ //! perform a syscall, which has the potential of failing. Operations on `Buf` //! and `BufMut` are infallible. -#![deny(warnings, missing_docs)] +#![deny(warnings, missing_docs, missing_debug_implementations)] #![doc(html_root_url = "https://docs.rs/bytes/0.4")] extern crate byteorder; -- GitLab