mirror of
https://github.com/tokio-rs/bytes.git
synced 2026-08-25 00:00:22 +02:00
Remove io::Cursor, and implement Buf/BufMut for slices instead (#261)
This commit is contained in:
committed by
Carl Lerche
parent
d8134903de
commit
55aa530dc1
+2
-2
@@ -59,10 +59,10 @@ impl<B: BufMut> Writer<B> {
|
||||
///
|
||||
/// ```rust
|
||||
/// use bytes::BufMut;
|
||||
/// use std::io::{self, Cursor};
|
||||
/// use std::io;
|
||||
///
|
||||
/// let mut buf = vec![].writer();
|
||||
/// let mut src = Cursor::new(b"hello world");
|
||||
/// let mut src = &b"hello world"[..];
|
||||
///
|
||||
/// io::copy(&mut src, &mut buf).unwrap();
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user