mirror of
https://github.com/tokio-rs/bytes.git
synced 2026-08-14 00:00:13 +02:00
committed by
Carl Lerche
parent
e0e30f00a1
commit
d43e283e5e
@@ -1265,6 +1265,8 @@ impl BytesMut {
|
||||
///
|
||||
/// Panics if `at > len`.
|
||||
pub fn split_to(&mut self, at: usize) -> BytesMut {
|
||||
assert!(at <= self.len());
|
||||
|
||||
BytesMut {
|
||||
inner: self.inner.split_to(at),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user