Skip to content

Commit fe1152f

Browse files
committed
Don't require fmt::Debug for Buf/BufMut.
1 parent ce7d490 commit fe1152f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/buf.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::io::Cursor;
22

33
/// A contiguous buffer of bytes.
44
// We're not using bytes::Buf because of some strange bugs with take().
5-
pub trait Buf: std::fmt::Debug {
5+
pub trait Buf {
66
fn remaining(&self) -> usize;
77
fn has_remaining(&self) -> bool {
88
self.remaining() > 0
@@ -26,7 +26,7 @@ impl Buf for &[u8] {
2626
}
2727
}
2828

29-
impl<T: AsRef<[u8]> + std::fmt::Debug> Buf for Cursor<T> {
29+
impl<T: AsRef<[u8]>> Buf for Cursor<T> {
3030
fn remaining(&self) -> usize {
3131
self.get_ref().as_ref().len() - self.position() as usize
3232
}
@@ -72,7 +72,7 @@ impl Buf for bytes::Bytes {
7272

7373
/// A mutable contiguous buffer of bytes.
7474
// We're not using bytes::BufMut because it doesn't allow seeking backwards (to set the size).
75-
pub trait BufMut: std::fmt::Debug {
75+
pub trait BufMut {
7676
// Returns the current length.
7777
fn len(&self) -> usize;
7878

0 commit comments

Comments
 (0)