Skip to content

Commit b5ec94a

Browse files
authored
fix(io): make also bytes method on AsyncReadExt/AsyncWriteExt feature gated (#766)
1 parent 9c97537 commit b5ec94a

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

compio-io/src/read/ext.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ pub trait AsyncReadExt: AsyncRead {
201201
Framed::new(codec, framer).with_duplex(self)
202202
}
203203

204+
#[cfg(feature = "bytes")]
204205
/// Convenience method to create a [`BytesFramed`] reader/writter
205206
/// out of a splittable.
206207
fn bytes(self) -> BytesFramed<Self::ReadHalf, Self::WriteHalf>

compio-io/src/write/ext.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ pub trait AsyncWriteExt: AsyncWrite {
132132
Framed::new(codec, framer).with_duplex(self)
133133
}
134134

135+
#[cfg(feature = "bytes")]
135136
/// Convenience method to create a [`BytesFramed`] reader/writer
136137
/// out of a splittable.
137138
fn bytes(self) -> BytesFramed<Self::ReadHalf, Self::WriteHalf>

0 commit comments

Comments
 (0)