use bytes::{Buf, BufMut}; let mut buf = b"hello world".take(2); let mut dst = vec![]; dst.put(&mut buf); assert_eq!(*dst, b"he"[.
確定! 回上一頁