aboutsummaryrefslogtreecommitdiff
path: root/src/buf/chain.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/buf/chain.rs')
-rw-r--r--src/buf/chain.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/buf/chain.rs b/src/buf/chain.rs
index 7d03d36..a66e3e8 100644
--- a/src/buf/chain.rs
+++ b/src/buf/chain.rs
@@ -1,5 +1,7 @@
use crate::{Buf, BufMut};
use crate::buf::IntoIter;
+
+#[cfg(feature = "std")]
use std::io::{IoSlice, IoSliceMut};
/// A `Chain` sequences two buffers.
@@ -178,6 +180,7 @@ impl<T, U> Buf for Chain<T, U>
self.b.advance(cnt);
}
+ #[cfg(feature = "std")]
fn bytes_vectored<'a>(&'a self, dst: &mut [IoSlice<'a>]) -> usize {
let mut n = self.a.bytes_vectored(dst);
n += self.b.bytes_vectored(&mut dst[n..]);
@@ -227,6 +230,7 @@ impl<T, U> BufMut for Chain<T, U>
self.b.advance_mut(cnt);
}
+ #[cfg(feature = "std")]
unsafe fn bytes_vectored_mut<'a>(&'a mut self, dst: &mut [IoSliceMut<'a>]) -> usize {
let mut n = self.a.bytes_vectored_mut(dst);
n += self.b.bytes_vectored_mut(&mut dst[n..]);