mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-23 00:00:10 +02:00
io: improve panic message of ReadBuf::put_slice() (#6629)
This commit is contained in:
@@ -248,7 +248,9 @@ impl<'a> ReadBuf<'a> {
|
||||
pub fn put_slice(&mut self, buf: &[u8]) {
|
||||
assert!(
|
||||
self.remaining() >= buf.len(),
|
||||
"buf.len() must fit in remaining()"
|
||||
"buf.len() must fit in remaining(); buf.len() = {}, remaining() = {}",
|
||||
buf.len(),
|
||||
self.remaining()
|
||||
);
|
||||
|
||||
let amt = buf.len();
|
||||
|
||||
Reference in New Issue
Block a user